2022-03-20 10:10:44 +04:00
|
|
|
|
namespace ToolsModule.ManagmentEntity
|
2021-03-28 19:15:55 +04:00
|
|
|
|
{
|
2022-03-15 22:02:13 +04:00
|
|
|
|
/// <summary>
|
2022-03-19 19:58:10 +04:00
|
|
|
|
/// Описание действий для хранилища сущности
|
2022-03-15 22:02:13 +04:00
|
|
|
|
/// </summary>
|
2022-03-19 19:58:10 +04:00
|
|
|
|
public interface IGenericEntityService<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
|
|
|
|
}
|
|
|
|
|
}
|