SUBD_PIbd-23_ZakharovRA/CarShowroom/CarShowroomDataModels/Dtos/CarDto.cs

27 lines
691 B
C#
Raw Normal View History

2024-05-03 10:27:07 +04:00
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2024-05-05 22:02:53 +04:00
namespace CarShowroomDataModels.Dtos
2024-05-03 10:27:07 +04:00
{
public class CarDto : ICar
{
public int Id { get; set; }
public string Color { get; set; }
2024-05-05 19:18:53 +04:00
public DateTime ReleaseDate { get; set; }
2024-05-03 10:27:07 +04:00
public int ModelId { get; set; }
2024-05-12 21:44:49 +04:00
public bool IsSaled { get; set; }
2024-05-03 10:27:07 +04:00
public CarDto(ICar model)
{
Id = model.Id;
Color = model.Color;
2024-05-05 19:18:53 +04:00
ReleaseDate = model.ReleaseDate;
2024-05-03 10:27:07 +04:00
ModelId = model.ModelId;
2024-05-12 21:44:49 +04:00
IsSaled = model.IsSaled;
2024-05-03 10:27:07 +04:00
}
}
}