Set up multi-project solution with DbFirst API, Application, Domain, and Infrastructure layers. Implemented database-first EF Core for the Catalog entity, including domain, DTOs, repository, service, and controller. Configured AutoMapper, DI, Swagger, and project settings. Added .gitattributes and initial configuration files.
13 lines
565 B
C#
13 lines
565 B
C#
using DbFirst.Domain.DomainEntities;
|
|
|
|
namespace DbFirst.Domain.Repositories;
|
|
|
|
public interface ICatalogRepository
|
|
{
|
|
Task<List<Catalog>> GetAllAsync(CancellationToken cancellationToken = default);
|
|
Task<Catalog?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
|
|
Task<Catalog> AddAsync(Catalog catalog, CancellationToken cancellationToken = default);
|
|
Task<bool> UpdateAsync(int id, Catalog catalog, CancellationToken cancellationToken = default);
|
|
Task<bool> DeleteAsync(int id, CancellationToken cancellationToken = default);
|
|
}
|