30 lines
790 B
C#
30 lines
790 B
C#
|
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 ModelView : IModel
|
|||
|
{
|
|||
|
public int Id { get; set; }
|
|||
|
[DisplayName("Модель")]
|
|||
|
public string Name { get; set; }
|
|||
|
[DisplayName("Цена")]
|
|||
|
public int Price { get; set; }
|
|||
|
public int MakeId { get; set; }
|
|||
|
[DisplayName("Марка")]
|
|||
|
public string MakeName { get; set; } = string.Empty;
|
|||
|
public ModelView(IModel model)
|
|||
|
{
|
|||
|
Id = model.Id;
|
|||
|
Name = model.Name;
|
|||
|
Price = model.Price;
|
|||
|
MakeId = model.MakeId;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|