Initial .NET 8 Web API with EF Core Db-First for Catalogs
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.
This commit is contained in:
12
DbFirst.Domain/Repositories/ICatalogRepository.cs
Normal file
12
DbFirst.Domain/Repositories/ICatalogRepository.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user