Initial Commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user