17 lines
774 B
C#
17 lines
774 B
C#
using WyvernInventory.Core.Interfaces.Repos;
|
|
using WyvernInventory.Core.Interfaces.Services;
|
|
using WyvernInventory.Core.Models;
|
|
|
|
namespace WyvernInventory.Infrastructure.Services;
|
|
|
|
public class GenericInventoryItemService(IDbObjectRepo<GenericInventoryItem> dbRepo)
|
|
: IDataObjectService<GenericInventoryItem>
|
|
{
|
|
private readonly IDbObjectRepo<GenericInventoryItem> _dbRepo = dbRepo;
|
|
|
|
public async Task<List<GenericInventoryItem>> GetAsync(Predicate<GenericInventoryItem>? filter = null) => await _dbRepo.GetAsync(filter);
|
|
|
|
public async Task<(int created, int updated)> UpsertAsync(List<GenericInventoryItem> items) => await _dbRepo.UpsertAsync(items);
|
|
|
|
public async Task DeleteAsync(List<GenericInventoryItem> items) => await _dbRepo.DeleteAsync(items);
|
|
} |