DepartmentProject/DepartmentPortal/Common/ToolsModule/ManagmentEntity/IGenericEntityService.cs

45 lines
1.2 KiB
C#
Raw Permalink Normal View History

2022-03-20 10:10:44 +04:00
namespace ToolsModule.ManagmentEntity
{
/// <summary>
/// Описание действий для хранилища сущности
/// </summary>
public interface IGenericEntityService<G, S>
where G : GetBindingModel
where S : SetBindingModel
{
/// <summary>
/// Получение списка сущностей
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
OperationResultModel Read(G model);
/// <summary>
/// Создание новой сущности
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
OperationResultModel Create(S model);
/// <summary>
/// Изменение сущности
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
OperationResultModel Update(S model);
/// <summary>
/// Удаление сущности
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
OperationResultModel Delete(G model);
/// <summary>
/// Восстановление сущности
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
OperationResultModel Restore(G model);
}
}