< Summary

Information
Class: Services.DataServices.ColumnMappingDataServices
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/DataServices/ColumnMappingDataServices.cs
Line coverage
31%
Covered lines: 5
Uncovered lines: 11
Coverable lines: 16
Total lines: 50
Line coverage: 31.2%
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%11100%
AddColumnMapping()100%210%
DeleteColumnMapping()100%210%
GetColumnMappings()100%210%
GetColumnMappingAsync()100%210%
GetColumnMappingAsync()100%11100%
UpdateColumnMapping()100%210%
SaveChanges()100%210%

File(s)

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

#LineLine coverage
 1using OzonDomains.Models;
 2using OzonRepositories.Data;
 3
 4namespace Services.DataServices
 5{
 6    public class ColumnMappingDataServices : IDataServices
 7    {
 8        private readonly ColumnMappingRepository _repository;
 9
 110        public ColumnMappingDataServices(ColumnMappingRepository repository)
 11        {
 112            _repository = repository;
 113        }
 14
 15        public async Task<int> AddColumnMapping(ColumnMapping value)
 16        {
 017            return await _repository.Add(value);
 018        }
 19
 20        public async Task<int> DeleteColumnMapping(ColumnMapping value)
 21        {
 022            return await _repository.Delete(value);
 023        }
 24
 25        public async Task<List<ColumnMapping>> GetColumnMappings()
 26        {
 027            return await _repository.Get();
 028        }
 29
 30        public async Task<ColumnMapping?> GetColumnMappingAsync(int id)
 31        {
 032            return await _repository.GetAsync(id);
 033        }
 34
 35        public async Task<ColumnMapping?> GetColumnMappingAsync(ColumnMapping value)
 36        {
 137            return await _repository.GetAsync(value);
 138        }
 39
 40        public async Task<int> UpdateColumnMapping(ColumnMapping value)
 41        {
 042            return await _repository.Update(value);
 043        }
 44
 45        public Task<int> SaveChanges()
 46        {
 047            return _repository.SaveChanges();
 48        }
 49    }
 50}