interface galore

This commit is contained in:
the 2024-06-22 11:01:06 +04:00
parent 9ffb97cbd0
commit 2cc2ac4280
9 changed files with 136 additions and 12 deletions

View File

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace Contracts.BindingModels namespace Contracts.BindingModels
{ {
internal class SupplyBindingModel : ISupply public class SupplyBindingModel : ISupply
{ {
public Guid Id { get; set; } public Guid Id { get; set; }
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;

View File

@ -1,4 +1,6 @@
using Contracts.BindingModels; using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -12,6 +14,7 @@ namespace Contracts.BusinessLogicContracts
bool Create(ProductBindingModel model); bool Create(ProductBindingModel model);
bool Update(ProductBindingModel model); bool Update(ProductBindingModel model);
bool Delete(ProductBindingModel model); bool Delete(ProductBindingModel model);
List<ProductViewModel>? ReadList(ProductSearchModel? model);
ProductViewModel? ReadElement(ProductSearchModel model);
} }
} }

View File

@ -0,0 +1,20 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.BusinessLogicContracts
{
public interface ISupplierLogic
{
List<SupplierViewModel>? ReadList(SupplierSearchModel? model);
SupplierViewModel? ReadElement(SupplierSearchModel model);
bool Create(SupplierBindingModel model);
bool Update(SupplierBindingModel model);
bool Delete(SupplierBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.BusinessLogicContracts
{
public interface ISupplyDocLogic
{
List<SupplyDocViewModel>? ReadList(SupplyDocSearchModel? model);
SupplyDocViewModel? ReadElement(SupplyDocSearchModel model);
bool Create(SupplyDocBindingModel model);
bool Update(SupplyDocBindingModel model);
bool Delete(SupplyDocBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.BusinessLogicContracts
{
public interface ISupplyLogic
{
List<SupplyViewModel>? ReadList(SupplySearchModel? model);
SupplyViewModel? ReadElement(SupplySearchModel model);
bool Create(SupplyBindingModel model);
bool Update(SupplyBindingModel model);
bool Delete(SupplyBindingModel model);
}
}

View File

@ -1,5 +1,6 @@
using Contracts.BindingModels; using Contracts.BindingModels;
using Contracts.SearchModels; using Contracts.SearchModels;
using Contracts.ViewModels;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -10,14 +11,11 @@ namespace Contracts.StorageContracts
{ {
public interface IProductStorage public interface IProductStorage
{ {
ProductBindingModel? Insert(ProductBindingModel model); List<ProductViewModel> GetFullList();
List<ProductViewModel> GetFilteredList(ProductSearchModel model);
IEnumerable<ProductBindingModel> GetList(ProductSearchModel? model); ProductViewModel? GetElement(ProductSearchModel model);
ProductViewModel? Insert(ProductBindingModel model);
ProductBindingModel? GetElement(ProductSearchModel model); ProductViewModel? Update(ProductBindingModel model);
ProductViewModel? Delete(ProductBindingModel model);
ProductBindingModel? Update(ProductBindingModel model); }
ProductBindingModel? Delete(ProductSearchModel model);
}
} }

View File

@ -0,0 +1,21 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.StorageContracts
{
public interface ISupplierStorage
{
List<SupplierViewModel> GetFullList();
List<SupplierViewModel> GetFilteredList(SupplierSearchModel model);
SupplierViewModel? GetElement(SupplierSearchModel model);
SupplierViewModel? Insert(SupplierBindingModel model);
SupplierViewModel? Update(SupplierBindingModel model);
SupplierViewModel? Delete(SupplierBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.StorageContracts
{
public interface ISupplyDocStorage
{
List<SupplyDocViewModel> GetFullList();
List<SupplyDocViewModel> GetFilteredList(SupplyDocSearchModel model);
SupplyDocViewModel? GetElement(SupplyDocSearchModel model);
SupplyDocViewModel? Insert(SupplyDocBindingModel model);
SupplyDocViewModel? Update(SupplyDocBindingModel model);
SupplyDocViewModel? Delete(SupplyDocBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using Contracts.BindingModels;
using Contracts.SearchModels;
using Contracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Contracts.StorageContracts
{
public interface ISupplyStorage
{
List<SupplyViewModel> GetFullList();
List<SupplyViewModel> GetFilteredList(SupplySearchModel model);
SupplyViewModel? GetElement(SupplySearchModel model);
SupplyViewModel? Insert(SupplyBindingModel model);
SupplyViewModel? Update(SupplyBindingModel model);
SupplyViewModel? Delete(SupplyBindingModel model);
}
}