< Summary

Information
Class: Services.DataServices.ExcludedArticleDataServices
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/DataServices/ExcludedArticleDataServices.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 22
Coverable lines: 22
Total lines: 65
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
ExcludeOrdersAsync()100%210%
AddExcludedArticle()100%210%
DeleteExcludedArticle()100%210%
GetExcludedArticles()100%210%
GetExcludedArticlesPaged()100%210%
GetExcludedArticleAsync()100%210%
GetExcludedArticleAsync()100%210%
UpdateExcludedArticle()100%210%
SaveChanges()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/DataServices/ExcludedArticleDataServices.cs

#LineLine coverage
 1using OzonDomains.Models;
 2using OzonRepositories.Data;
 3
 4namespace Services.DataServices
 5{
 6    public class ExcludedArticleDataServices : IDataServices
 7    {
 8        private readonly ExcludedArticleRepository _repository;
 9
 010        public ExcludedArticleDataServices(ExcludedArticleRepository repository)
 11        {
 012            _repository = repository;
 013        }
 14
 15        public async Task<List<Order>> ExcludeOrdersAsync(List<Order> orders)
 16        {
 017            return await _repository.GetFilteredOrdersAsync(orders);
 018        }
 19
 20        public async Task<int> AddExcludedArticle(ExcludedArticle value)
 21        {
 022            return await _repository.Add(value);
 023        }
 24
 25        public async Task<int> DeleteExcludedArticle(ExcludedArticle value)
 26        {
 027            return await _repository.Delete(value);
 028        }
 29
 30        public async Task<List<ExcludedArticle>> GetExcludedArticles()
 31        {
 032            return await _repository.Get();
 033        }
 34
 35        public async Task<(List<ExcludedArticle> Articles, int TotalCount)> GetExcludedArticlesPaged(int page = 1, int p
 36        {
 037            var articles = await _repository.GetPaged(page, pageSize);
 038            var totalCount = await _repository.GetTotalCount();
 039            return (articles, totalCount);
 040        }
 41
 42
 43        public async Task<ExcludedArticle?> GetExcludedArticleAsync(int id)
 44        {
 045            return await _repository.GetAsync(id);
 046        }
 47
 48        public async Task<ExcludedArticle?> GetExcludedArticleAsync(ExcludedArticle value)
 49        {
 050            return await _repository.GetAsync(value);
 051        }
 52
 53        public async Task<int> UpdateExcludedArticle(ExcludedArticle value)
 54        {
 055            return await _repository.Update(value);
 056        }
 57
 58        public Task<int> SaveChanges()
 59        {
 060            return _repository.SaveChanges();
 61        }
 62
 63
 64    }
 65}