2021-03-28 19:15:55 +04:00
|
|
|
|
using ModuleTools.BindingModels;
|
|
|
|
|
using ModuleTools.Models;
|
2021-04-14 13:47:48 +04:00
|
|
|
|
using System.Threading.Tasks;
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
namespace ModuleTools.Interfaces
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Описание логики для хранилища сущности
|
|
|
|
|
/// </summary>
|
2021-03-29 12:13:47 +04:00
|
|
|
|
public interface IGenerticEntityService<G, S>
|
2021-03-28 19:15:55 +04:00
|
|
|
|
where G : GetBindingModel
|
|
|
|
|
where S : SetBindingModel
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение списка сущностей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-04-14 13:47:48 +04:00
|
|
|
|
Task<OperationResultModel> ReadAsync(G model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Создание новой сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-04-14 13:47:48 +04:00
|
|
|
|
Task<OperationResultModel> CreateAsync(S model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Изменение сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-04-14 13:47:48 +04:00
|
|
|
|
Task<OperationResultModel> UpdateAsync(S model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2021-04-14 13:47:48 +04:00
|
|
|
|
Task<OperationResultModel> DeleteAsync(G model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
}
|
|
|
|
|
}
|