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

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