< Summary

Information
Class: Services.DataServices.OrderHistoryDataService
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/DataServices/OrderHistoryDataService.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 20
Coverable lines: 20
Total lines: 58
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%
AddOrderHistory()100%210%
DeleteOrderHistory()100%210%
GetOrderHistories()100%210%
GetOrderHistoryAsync()100%210%
GetByOrderIdAsync()100%210%
GetRecentChangesAsync()100%210%
GetChangesAfterDateAsync()100%210%
UpdateOrderHistory()100%210%
SaveChanges()100%210%

File(s)

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

#LineLine coverage
 1using OzonDomains.Models;
 2
 3namespace Services.DataServices;
 4
 5public class OrderHistoryDataService : IOrderHistoryDataService
 6{
 7    private readonly IOrderHistoryRepository _repository;
 8
 09    public OrderHistoryDataService(IOrderHistoryRepository repository)
 10    {
 011        _repository = repository;
 012    }
 13
 14    public async Task<int> AddOrderHistory(OrderHistory value)
 15    {
 016        return await _repository.Add(value);
 017    }
 18
 19    public async Task<int> DeleteOrderHistory(OrderHistory value)
 20    {
 021        return await _repository.Delete(value);
 022    }
 23
 24    public async Task<List<OrderHistory>> GetOrderHistories()
 25    {
 026        return await _repository.Get();
 027    }
 28
 29    public async Task<OrderHistory?> GetOrderHistoryAsync(int id)
 30    {
 031        return await _repository.GetAsync(id);
 032    }
 33
 34    public async Task<List<OrderHistory>> GetByOrderIdAsync(int orderId)
 35    {
 036        return await _repository.GetByOrderIdAsync(orderId);
 037    }
 38
 39    public async Task<List<OrderHistory>> GetRecentChangesAsync(int count = 50)
 40    {
 041        return await _repository.GetRecentChangesAsync(count);
 042    }
 43
 44    public async Task<List<OrderHistory>> GetChangesAfterDateAsync(DateTime afterDate)
 45    {
 046        return await _repository.GetChangesAfterDateAsync(afterDate);
 047    }
 48
 49    public async Task<int> UpdateOrderHistory(OrderHistory value)
 50    {
 051        return await _repository.Update(value);
 052    }
 53
 54    public Task<int> SaveChanges()
 55    {
 056        throw new NotImplementedException();
 57    }
 58}