Project/Project.Infrastructure/Interfaces/ICategoryRepository.cs
2024-06-28 15:15:15 +02:00

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);
}
}