26 lines
566 B
C#
26 lines
566 B
C#
using Project.Domain.Entities;
|
|
|
|
namespace Project.Infrastructure.Interfaces
|
|
{
|
|
public interface ICategoryRepository
|
|
{
|
|
// CREATE
|
|
Task<Category?> AddAsync(Category category);
|
|
|
|
// READ ALL
|
|
Task<IEnumerable<Category>> GetAllAsync();
|
|
|
|
// READ BY ID
|
|
Task<Category?> GetByIdAsync(int id);
|
|
|
|
// READ BY NAME
|
|
Task<Category?> GetByNameAsync(string name);
|
|
|
|
// UPDATE
|
|
Task<bool> UpdateAsync(Category category);
|
|
|
|
// DELETE
|
|
Task<bool> DeleteAsync(Category category);
|
|
}
|
|
}
|