public CreateModel(FuelLogger.Data.ApplicationDbContext context, UserManager <ApplicationUser> user) { _context = context; _user = user; AvailableVehicles = new List <SelectListItem>(); foreach (var vehicle in _context.Vehicle) { AvailableVehicles.Add(new SelectListItem(vehicle.Name, vehicle.Id.ToString())); } }
public DetailsModel(FuelLogger.Data.ApplicationDbContext context) { _context = context; }
public IndexModel(FuelLogger.Data.ApplicationDbContext context) { _context = context; }
public CreateModel(FuelLogger.Data.ApplicationDbContext context, UserManager <ApplicationUser> user) { _context = context; _user = user; }