binding models + fixes
This commit is contained in:
parent
e53f659b02
commit
a9a26d56c4
@ -3,11 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33122.133
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportGuide", "TransportGuide.csproj", "{4FB4F845-A1B0-4B67-B79D-054D8D9BF837}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportGuide", "TransportGuide.csproj", "{4FB4F845-A1B0-4B67-B79D-054D8D9BF837}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportGuideDataModels", "..\TransportGuideDataModels\TransportGuideDataModels.csproj", "{97F50689-60B7-4955-9CF0-01CBCA875DEC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportGuideDataModels", "..\TransportGuideDataModels\TransportGuideDataModels.csproj", "{97F50689-60B7-4955-9CF0-01CBCA875DEC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportGuideDatabaseImplements", "..\TransportGuideDatabaseImplements\TransportGuideDatabaseImplements.csproj", "{EB404893-A2A8-4027-B5DD-3AB781274B4D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TransportGuideDatabaseImplements", "..\TransportGuideDatabaseImplements\TransportGuideDatabaseImplements.csproj", "{EB404893-A2A8-4027-B5DD-3AB781274B4D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransportGuideContracts", "..\TransportGuideContracts\TransportGuideContracts.csproj", "{C54EC4EF-09BD-4FFC-84A1-7C938F0803FB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -27,6 +29,10 @@ Global
|
||||
{EB404893-A2A8-4027-B5DD-3AB781274B4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EB404893-A2A8-4027-B5DD-3AB781274B4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EB404893-A2A8-4027-B5DD-3AB781274B4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C54EC4EF-09BD-4FFC-84A1-7C938F0803FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C54EC4EF-09BD-4FFC-84A1-7C938F0803FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C54EC4EF-09BD-4FFC-84A1-7C938F0803FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C54EC4EF-09BD-4FFC-84A1-7C938F0803FB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
22
TransportGuideContracts/BindingModels/RouteBindingModel.cs
Normal file
22
TransportGuideContracts/BindingModels/RouteBindingModel.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TransportGuideDataModels.Models;
|
||||
|
||||
namespace TransportGuideContracts.BindingModels
|
||||
{
|
||||
public class RouteBindingModel : IRouteModel
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string IP { get; set; } = string.Empty;
|
||||
|
||||
public int TransportTypeId { get; set; }
|
||||
|
||||
public Dictionary<int, (IStopModel, int)> StopNRoute { get; set; } = new();
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
16
TransportGuideContracts/BindingModels/StopBindingModel.cs
Normal file
16
TransportGuideContracts/BindingModels/StopBindingModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TransportGuideDataModels.Models;
|
||||
|
||||
namespace TransportGuideContracts.BindingModels
|
||||
{
|
||||
public class StopBindingModel : IStopModel
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TransportGuideDataModels.Models;
|
||||
|
||||
namespace TransportGuideContracts.BindingModels
|
||||
{
|
||||
public class TransportTypeBindingModel : ITransportTypeModel
|
||||
{
|
||||
public double price { get; set; }
|
||||
|
||||
public string name { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
13
TransportGuideContracts/TransportGuideContracts.csproj
Normal file
13
TransportGuideContracts/TransportGuideContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TransportGuideDataModels\TransportGuideDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -6,14 +6,14 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace TransportGuideDataModels.Models
|
||||
{
|
||||
public interface INrouteModel
|
||||
public interface IRouteModel : IId
|
||||
{
|
||||
string Name { get;}
|
||||
string IP { get;}
|
||||
|
||||
int TransportTypeId { get;}
|
||||
|
||||
Dictionary<int, (IStopModel, int)>? StopNRoute { get; }
|
||||
Dictionary<int, (IStopModel, int)> StopNRoute { get; }
|
||||
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace TransportGuideDataModels.Models
|
||||
{
|
||||
public interface IStopModel
|
||||
public interface IStopModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace TransportGuideDataModels.Models
|
||||
{
|
||||
public interface ITransportTypeModel
|
||||
public interface ITransportTypeModel : IId
|
||||
{
|
||||
double price { get;}
|
||||
string name { get;}
|
||||
|
Loading…
Reference in New Issue
Block a user