49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using ModuleTools.BindingModels;
|
|
using ModuleTools.Models;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ModuleTools.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Описание логики для хранилища сущности
|
|
/// </summary>
|
|
public interface IGenerticEntityService<G, S>
|
|
where G : GetBindingModel
|
|
where S : SetBindingModel
|
|
{
|
|
/// <summary>
|
|
/// Получение списка сущностей
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResultModel> ReadAsync(G model);
|
|
|
|
/// <summary>
|
|
/// Создание новой сущности
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResultModel> CreateAsync(S model);
|
|
|
|
/// <summary>
|
|
/// Изменение сущности
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResultModel> UpdateAsync(S model);
|
|
|
|
/// <summary>
|
|
/// Удаление сущности
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResultModel> DeleteAsync(G model);
|
|
|
|
/// <summary>
|
|
/// Восстановление сущности
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResultModel> RestoreAsync(G model);
|
|
}
|
|
} |