2022-03-20 10:10:44 +04:00
|
|
|
|
namespace ToolsModule.ManagmentEntity
|
2022-03-19 19:58:10 +04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Описание действий для логики сущности
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="G"></typeparam>
|
|
|
|
|
/// <typeparam name="S"></typeparam>
|
|
|
|
|
/// <typeparam name="L"></typeparam>
|
|
|
|
|
/// <typeparam name="E"></typeparam>
|
|
|
|
|
public interface IGenericEntityLogic<G, S, L, E> : IErrors
|
|
|
|
|
where G : GetBindingModel
|
|
|
|
|
where S : SetBindingModel
|
|
|
|
|
where L : ListViewModel<E>
|
|
|
|
|
where E : ElementViewModel
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение списка записей
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
L GetList(G model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
E GetElement(G model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Создание записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
E Create(S model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Изменение записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
E Update(S model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool Delete(G model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Восстанолвение записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
E Restore(G model);
|
|
|
|
|
}
|
|
|
|
|
}
|