Создание интерфейсов хранилища и логики магазина
This commit is contained in:
parent
53432af1bb
commit
f773128233
@ -1,4 +1,8 @@
|
|||||||
using System;
|
using LawFirmContracts.BindingModels;
|
||||||
|
using LawFirmContracts.SearchModels;
|
||||||
|
using LawFirmContracts.ViewModels;
|
||||||
|
using LawFirmDataModels.Models;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -6,7 +10,13 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace LawFirmContracts.BusinessLogicContracts
|
namespace LawFirmContracts.BusinessLogicContracts
|
||||||
{
|
{
|
||||||
internal interface IShopLogic
|
public interface IShopLogic
|
||||||
{
|
{
|
||||||
|
ShopViewModel? ReadElement(ShopSearchModel model);
|
||||||
|
List<ShopViewModel> ReadList(ShopSearchModel? model);
|
||||||
|
bool Create(ShopBindingModel model);
|
||||||
|
bool Update(ShopBindingModel model);
|
||||||
|
bool Delete(ShopBindingModel model);
|
||||||
|
bool SupplyDocuments(ShopSearchModel model, IDocumentModel document, int count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
21
LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs
Normal file
21
LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using LawFirmContracts.BindingModels;
|
||||||
|
using LawFirmContracts.SearchModels;
|
||||||
|
using LawFirmContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmContracts.StorageContracts
|
||||||
|
{
|
||||||
|
public interface IShopStorage
|
||||||
|
{
|
||||||
|
ShopViewModel? GetElement(ShopSearchModel model);
|
||||||
|
List<ShopViewModel> GetFullList();
|
||||||
|
List<ShopViewModel> GetFilteredList(ShopSearchModel model);
|
||||||
|
ShopViewModel? Insert(ShopBindingModel model);
|
||||||
|
ShopViewModel? Update(ShopBindingModel model);
|
||||||
|
ShopViewModel? Delete(ShopBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace LawFirmContracts.ViewModels
|
namespace LawFirmContracts.ViewModels
|
||||||
{
|
{
|
||||||
internal class ShopViewModel : IShopModel
|
public class ShopViewModel : IShopModel
|
||||||
{
|
{
|
||||||
[DisplayName("Название магазина")]
|
[DisplayName("Название магазина")]
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user