41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
|
using ModelTools.BindingModels;
|
|||
|
using ModelTools.OperationResultModels;
|
|||
|
|
|||
|
namespace ModelTools.Interfaces
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Описание логики для хранилища сущности
|
|||
|
/// </summary>
|
|||
|
public interface IEntityService<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);
|
|||
|
}
|
|||
|
}
|