DataModels: Guarantor + Contractor.
BindingModels: Guarantor.
This commit is contained in:
parent
9b8c383e22
commit
c3f77f6bad
@ -0,0 +1,19 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class ComponentBindingModel : IComponentModel
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public double Price { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
21
ComputerStoreContracts/BindingModels/PCBindingModel.cs
Normal file
21
ComputerStoreContracts/BindingModels/PCBindingModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class PCBindingModel : IPCModel
|
||||
{
|
||||
public int ID {get; set;}
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public double Price { get; set; }
|
||||
|
||||
public Dictionary<int, (IComponentModel, int)> PCComponents { get; set; } = new();
|
||||
|
||||
|
||||
}
|
||||
}
|
21
ComputerStoreContracts/BindingModels/ProductBindingModel.cs
Normal file
21
ComputerStoreContracts/BindingModels/ProductBindingModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using ComputerStoreDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreContracts.BindingModels
|
||||
{
|
||||
public class ProductBindingModel : IProductModel
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public double Price { get; set; }
|
||||
|
||||
public Dictionary<int, (IComponentModel, int)> ProductComponents { get; set; } = new();
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -6,4 +6,15 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="BusinessLogicContracts\" />
|
||||
<Folder Include="ViewModels\" />
|
||||
<Folder Include="StorageContracts\" />
|
||||
<Folder Include="SearchModels\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ComputerStoreDataModels\ComputerStoreDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
14
ComputerStoreDataModels/Models/IComponentModel.cs
Normal file
14
ComputerStoreDataModels/Models/IComponentModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Models
|
||||
{
|
||||
public interface IComponentModel : IID
|
||||
{
|
||||
string Name { get;}
|
||||
double Price { get;}
|
||||
}
|
||||
}
|
15
ComputerStoreDataModels/Models/IPCModel.cs
Normal file
15
ComputerStoreDataModels/Models/IPCModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Models
|
||||
{
|
||||
public interface IPCModel : IID
|
||||
{
|
||||
string Name { get; }
|
||||
double Price { get; }
|
||||
Dictionary<int,(IComponentModel,int)> PCComponents { get; }
|
||||
}
|
||||
}
|
16
ComputerStoreDataModels/Models/IProductModel.cs
Normal file
16
ComputerStoreDataModels/Models/IProductModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Models
|
||||
{
|
||||
public interface IProductModel : IID
|
||||
{
|
||||
string Name { get; }
|
||||
double Price { get; }
|
||||
Dictionary<int,(IComponentModel,int)> ProductComponents { get; }
|
||||
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ComputerStoreDataModels.Model
|
||||
namespace ComputerStoreDataModels.Models
|
||||
{
|
||||
public class IUserModel : IID
|
||||
{
|
Loading…
Reference in New Issue
Block a user