2021-03-28 19:15:55 +04:00
|
|
|
|
using ModuleTools.BindingModels;
|
|
|
|
|
using ModuleTools.Models;
|
|
|
|
|
|
|
|
|
|
namespace ModuleTools.Interfaces
|
|
|
|
|
{
|
2022-03-15 22:02:13 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Описание логики для хранилища сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
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>
|
2022-03-15 22:02:13 +04:00
|
|
|
|
OperationResultModel Read(G model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Создание новой сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-03-15 22:02:13 +04:00
|
|
|
|
OperationResultModel Create(S model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Изменение сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-03-15 22:02:13 +04:00
|
|
|
|
OperationResultModel Update(S model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-03-15 22:02:13 +04:00
|
|
|
|
OperationResultModel Delete(G model);
|
2021-04-28 17:58:52 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Восстановление сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-03-15 22:02:13 +04:00
|
|
|
|
OperationResultModel Restore(G model);
|
2021-03-28 19:15:55 +04:00
|
|
|
|
}
|
|
|
|
|
}
|