| | | 1 | | using OzonDomains.Models.MatchedRowSys; |
| | | 2 | | using OzonRepositories.Data; |
| | | 3 | | |
| | | 4 | | namespace Services.DataServices |
| | | 5 | | { |
| | | 6 | | public class MatchedResultDataServices : IDataServices |
| | | 7 | | { |
| | | 8 | | private readonly MatchedResultRepository _repository; |
| | | 9 | | |
| | 0 | 10 | | public MatchedResultDataServices(MatchedResultRepository repository) |
| | | 11 | | { |
| | 0 | 12 | | _repository = repository; |
| | 0 | 13 | | } |
| | | 14 | | |
| | | 15 | | public async Task<int> AddMatchedResult(MatchedResult value) |
| | | 16 | | { |
| | 0 | 17 | | return await _repository.Add(value); |
| | 0 | 18 | | } |
| | | 19 | | |
| | | 20 | | public async Task<int> DeleteMatchedResult(MatchedResult value) |
| | | 21 | | { |
| | 0 | 22 | | return await _repository.Delete(value); |
| | 0 | 23 | | } |
| | | 24 | | public async Task<int> DeleteMatchedResult(int id) |
| | | 25 | | { |
| | 0 | 26 | | return await _repository.Delete(id); |
| | 0 | 27 | | } |
| | | 28 | | |
| | | 29 | | public async Task<List<MatchedResult>> GetMatchedResults() |
| | | 30 | | { |
| | 0 | 31 | | return await _repository.Get(); |
| | 0 | 32 | | } |
| | | 33 | | |
| | | 34 | | public async Task<List<MatchedResult>> GetBaseMatchedResults() |
| | | 35 | | { |
| | 0 | 36 | | return await _repository.GetBase(); |
| | 0 | 37 | | } |
| | | 38 | | |
| | | 39 | | public async Task<MatchedResult?> GetMatchedResultAsync(int id) |
| | | 40 | | { |
| | 0 | 41 | | return await _repository.GetAsync(id); |
| | 0 | 42 | | } |
| | | 43 | | |
| | | 44 | | public async Task<MatchedResult?> GetMatchedResultAsync(MatchedResult value) |
| | | 45 | | { |
| | 0 | 46 | | return await _repository.GetAsync(value); |
| | 0 | 47 | | } |
| | | 48 | | |
| | | 49 | | public async Task<int> UpdateMatchedResult(MatchedResult value) |
| | | 50 | | { |
| | 0 | 51 | | return await _repository.UpdateCascade(value); |
| | 0 | 52 | | } |
| | | 53 | | |
| | | 54 | | public Task<int> SaveChanges() |
| | | 55 | | { |
| | 0 | 56 | | return _repository.SaveChanges(); |
| | | 57 | | } |
| | | 58 | | } |
| | | 59 | | } |