Пример #1
0
 public static CarTypeViewModel CreateCarTypeViewModel(CarType carType)
 {
     ApplicationDbContext db = new ApplicationDbContext();
     CarTypeViewModel ectvm = new CarTypeViewModel();
     ectvm.CarTypeData = carType;
     ectvm.CarEdited = new Car();//Just to prevent it being null
     //ectvm.CarModels = new SelectList(db.CarModels, "CarModelId", "Description", ectvm.CarTypeData.CarModelId);
     return ectvm;
 }
Пример #2
0
 public CarTypeView()
 {
     carType = new CarType();
 }