Esempio n. 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;
 }
Esempio n. 2
0
 public CarTypeView()
 {
     carType = new CarType();
 }