Admin controller, Locations controller, requests to add available countries, request to get available countries
This commit is contained in:
		| @@ -7,10 +7,9 @@ namespace Infrastructure.Database.Generic; | ||||
|  | ||||
| /// Generic repository pattern | ||||
| /// <param name="writer"><inheritdoc cref="IGenericWriter"/></param> | ||||
| /// <param name="unitOfWork"><inheritdoc cref="IUnitOfWork"/></param> | ||||
| /// <typeparam name="T">Type of entity</typeparam> | ||||
| /// <remarks>Should be inherited to create typed repositories</remarks> | ||||
| public abstract class GenericRepository<T>(IGenericReader reader, IGenericWriter writer, IUnitOfWork unitOfWork) : IGenericRepository<T> | ||||
| public abstract class GenericRepository<T>(IGenericReader reader, IGenericWriter writer) : IGenericRepository<T> | ||||
|     where T : class, IEntity | ||||
| { | ||||
|     /// <inheritdoc cref="IGenericRepository{T}.GetAllAsync"/> | ||||
| @@ -41,10 +40,6 @@ public abstract class GenericRepository<T>(IGenericReader reader, IGenericWriter | ||||
|         writer.Remove(entity); | ||||
|     } | ||||
|  | ||||
|     /// <inheritdoc cref="IGenericRepository{T}.SaveAsync"/> | ||||
|     public async Task SaveAsync(CancellationToken cancellationToken) | ||||
|         => await unitOfWork.SaveAsync(cancellationToken); | ||||
|  | ||||
|     /// Should be overriden to load navigation properties of entity | ||||
|     protected virtual IQueryable<T> LoadDomain() | ||||
|     { | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| using Domains; | ||||
| using ApplicationLayer.GeneralNeededServices; | ||||
| using Domains; | ||||
|  | ||||
| namespace Infrastructure.Database.Generic; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user