< Summary

Information
Class: Services.DataServices.ExpenseTypeDataServices
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/DataServices/ExpenseTypeDataServices.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 14
Coverable lines: 14
Total lines: 50
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%
AddExpenseType(...)100%210%
DeleteExpenseType(...)100%210%
GetExpenseTypes()100%210%
GetExpenseTypeAsync()100%210%
GetExpenseTypeAsync()100%210%
UpdateExpenseType()100%210%
SaveChanges()100%210%

File(s)

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

#LineLine coverage
 1using OzonDomains.Models;
 2using OzonRepositories.Data;
 3
 4namespace Services.DataServices
 5{
 6    public class ExpenseTypeDataServices : IDataServices
 7    {
 8        private readonly ExpenseTypeRepository _repository;
 9
 010        public ExpenseTypeDataServices(ExpenseTypeRepository repository)
 11        {
 012            _repository = repository;
 013        }
 14
 15        public Task<int> AddExpenseType(ExpenseType value)
 16        {
 017            return _repository.Add(value);
 18        }
 19
 20        public Task<int> DeleteExpenseType(ExpenseType value)
 21        {
 022            return _repository.Delete(value);
 23        }
 24
 25        public async Task<List<ExpenseType>> GetExpenseTypes()
 26        {
 027            return await _repository.Get();
 028        }
 29
 30        public async Task<ExpenseType?> GetExpenseTypeAsync(int id)
 31        {
 032            return await _repository.GetAsync(id);
 033        }
 34
 35        public async Task<ExpenseType?> GetExpenseTypeAsync(ExpenseType value)
 36        {
 037            return await _repository.GetAsync(value);
 038        }
 39
 40        public async Task<int> UpdateExpenseType(ExpenseType value)
 41        {
 042            return await _repository.Update(value);
 043        }
 44
 45        public Task<int> SaveChanges()
 46        {
 047            throw new NotImplementedException();
 48        }
 49    }
 50}