35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using CarShowroomContracts.AbstractModels;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CarShowroomDataModels.Views
|
|
{
|
|
public class CarView : ICar
|
|
{
|
|
[DisplayName("Номер машины")]
|
|
public int Id { get; set; }
|
|
[DisplayName("Цвет")]
|
|
public string Color { get; set; }
|
|
[DisplayName("Дата производства")]
|
|
public DateTime ReleaseDate { get; set; }
|
|
public int ModelId { get; set; }
|
|
[DisplayName("Модель")]
|
|
public string ModelName { get; set; } = string.Empty;
|
|
[DisplayName("Цена")]
|
|
public int ModelPrice { get; set; }
|
|
[DisplayName("Марка")]
|
|
public string MakeName { get; set; } = string.Empty;
|
|
public CarView(ICar model)
|
|
{
|
|
Id = model.Id;
|
|
Color = model.Color;
|
|
ReleaseDate = model.ReleaseDate;
|
|
ModelId = model.ModelId;
|
|
}
|
|
}
|
|
}
|