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