add Dtos
This commit is contained in:
parent
c41c5a43c7
commit
af78799f28
@ -12,5 +12,7 @@ namespace CarShowroomContracts.AbstractModels
|
|||||||
int Cost { get; }
|
int Cost { get; }
|
||||||
int ClientId { get; }
|
int ClientId { get; }
|
||||||
int EmployeeId { get; }
|
int EmployeeId { get; }
|
||||||
}
|
List<int> CarIds { get; }
|
||||||
|
List<int> ServiseIds { get; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,4 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Dtos\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
24
CarShowroom/CarShowroomDataModels/Dtos/CarDto.cs
Normal file
24
CarShowroom/CarShowroomDataModels/Dtos/CarDto.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using CarShowroomContracts.AbstractModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class CarDto : ICar
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Color { get; set; }
|
||||||
|
public DateTime RealiseDate { get; set; }
|
||||||
|
public int ModelId { get; set; }
|
||||||
|
public CarDto(ICar model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Color = model.Color;
|
||||||
|
RealiseDate = model.RealiseDate;
|
||||||
|
ModelId = model.ModelId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
CarShowroom/CarShowroomDataModels/Dtos/ClientDto.cs
Normal file
24
CarShowroom/CarShowroomDataModels/Dtos/ClientDto.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using CarShowroomDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class ClientDto : IClient
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Email { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
|
public ClientDto(IClient model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Name = model.Name;
|
||||||
|
Email = model.Email;
|
||||||
|
Password = model.Password;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
CarShowroom/CarShowroomDataModels/Dtos/EmployeeDto.cs
Normal file
24
CarShowroom/CarShowroomDataModels/Dtos/EmployeeDto.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using CarShowroomDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class EmployeeDto : IEmployee
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Email { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
|
public EmployeeDto(IEmployee model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Name = model.Name;
|
||||||
|
Email = model.Email;
|
||||||
|
Password = model.Password;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
CarShowroom/CarShowroomDataModels/Dtos/MakeDto.cs
Normal file
20
CarShowroom/CarShowroomDataModels/Dtos/MakeDto.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using CarShowroomContracts.AbstractModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class MakeDto : IMake
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public MakeDto(IMake model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Name = model.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
CarShowroom/CarShowroomDataModels/Dtos/ModeDto.cs
Normal file
24
CarShowroom/CarShowroomDataModels/Dtos/ModeDto.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using CarShowroomContracts.AbstractModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class ModeDto : IModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int Price { get; set; }
|
||||||
|
public int MakeId { get; set; }
|
||||||
|
public ModeDto(IModel model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Name = model.Name;
|
||||||
|
Price = model.Price;
|
||||||
|
MakeId = model.MakeId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
CarShowroom/CarShowroomDataModels/Dtos/ServiceDto.cs
Normal file
22
CarShowroom/CarShowroomDataModels/Dtos/ServiceDto.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using CarShowroomContracts.AbstractModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CarShowroomContracts.Dtos
|
||||||
|
{
|
||||||
|
public class ServiceDto : IService
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int Cost { get; set; }
|
||||||
|
public ServiceDto(IService model)
|
||||||
|
{
|
||||||
|
Id = model.Id;
|
||||||
|
Name = model.Name;
|
||||||
|
Cost = model.Cost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user