| | | 1 | | using OzonDomains.Models; |
| | | 2 | | using OzonDomains.Models.MatchedRowSys; |
| | | 3 | | using OzonRepositories.Data; |
| | | 4 | | using System.Collections.Generic; |
| | | 5 | | using System.Threading.Tasks; |
| | | 6 | | |
| | | 7 | | namespace Services.DataServices |
| | | 8 | | { |
| | | 9 | | public class SavedMatchingColumnDataServices : IDataServices |
| | | 10 | | { |
| | | 11 | | private readonly SavedMatchingColumnRepository _repository; |
| | | 12 | | |
| | 0 | 13 | | public SavedMatchingColumnDataServices(SavedMatchingColumnRepository repository) |
| | | 14 | | { |
| | 0 | 15 | | _repository = repository; |
| | 0 | 16 | | } |
| | | 17 | | |
| | | 18 | | public Task<int> AddSavedMatchingColumn(SavedMatchingColumn value) |
| | | 19 | | { |
| | 0 | 20 | | return _repository.Add(value); |
| | | 21 | | } |
| | | 22 | | public async Task<List<SavedMatchingColumn>> GetSavedMatchingColumns() |
| | | 23 | | { |
| | 0 | 24 | | return await _repository.Get(); |
| | 0 | 25 | | } |
| | | 26 | | |
| | | 27 | | public async Task<SavedMatchingColumn?> GetSavedMatchingColumnAsync(int id) |
| | | 28 | | { |
| | 0 | 29 | | return await _repository.GetAsync(id); |
| | 0 | 30 | | } |
| | | 31 | | public async Task<int> SaveChanges() |
| | | 32 | | { |
| | 0 | 33 | | return await _repository.SaveChanges(); |
| | 0 | 34 | | } |
| | | 35 | | } |
| | | 36 | | } |