SUBD_PIbd-23_ZakharovRA/CarShowroom/CarShowroomDataModels/Views/CarView.cs

33 lines
982 B
C#
Raw Normal View History

2024-05-03 10:59:33 +04:00
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class CarView : ICar
{
[DisplayName("Номер машины")]
public int Id { get; set; }
[DisplayName("Цвет")]
public string Color { get; set; }
[DisplayName("Дата производства")]
public DateTime RealiseDate { get; set; }
public int ModelId { get; set; }
[DisplayName("Модель")]
public string ModelName { get; set; } = string.Empty;
[DisplayName("Марка")]
public string MakeName { get; set; } = string.Empty;
public CarView(ICar model)
{
Id = model.Id;
Color = model.Color;
RealiseDate = model.RealiseDate;
ModelId = model.ModelId;
}
}
}