Changed domains, configured links between VisaApplication and Applicant,created generic repository and repositories for domains

This commit is contained in:
2024-08-14 18:49:42 +03:00
parent e0f9a0f10f
commit e3d0d05355
35 changed files with 237 additions and 80 deletions

View File

@@ -0,0 +1,25 @@
using Domains;
namespace Infrastructure.Database.Generic
{
/// Writes data to data storage
/// <remarks><see cref="IUnitOfWork"/> should be used to save changes</remarks>
public interface IGenericWriter
{
/// Add <paramref name="entity"/> to data storage
/// <param name="entity">Entity to add</param>
/// <param name="cancellationToken">Cancellation Token</param>
/// <typeparam name="T">Entity type</typeparam>
Task AddAsync<T>(T entity, CancellationToken cancellationToken) where T : class, IEntity;
/// Update <paramref name="entity"/> in data storage
/// <param name="entity">Entity to update</param>
/// <typeparam name="T">Entity type</typeparam>
void Update<T>(T entity) where T : class, IEntity;
/// Remove <paramref name="entity"/> from data storage
/// <param name="entity">Entity to remove</param>
/// <typeparam name="T">Entity type</typeparam>
void Remove<T>(T entity) where T : class, IEntity;
}
}