public RoomsController(ReservationsDbContext context, IHostingEnvironment hostingEnvironment, IMapper mapper) { _context = context; _hostingEnvironment = hostingEnvironment; _mapper = mapper; this._environment = _environment; }
// private readonly MailJetService _mailService; public AuthController(ReservationsDbContext dbContext /*, MailJetService mailService*/) { _dbContext = dbContext; // _mailService = mailService; }
public SitesController(ReservationsDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public ReservationsController(ReservationsDbContext context) { _context = context; }
public AttendingsController(ReservationsDbContext context) { _context = context; }
public ImagesController(ReservationsDbContext context, IHostingEnvironment hostingEnvironment) { _context = context; _hostingEnvironment = hostingEnvironment; }
public LoginController(ReservationsDbContext db) { database = db; }
public UserService(ReservationsDbContext context, IConfiguration configuration) { _context = context; _configuration = configuration; }
public static void SeedData(ReservationsDbContext dBContext) { if (!dBContext.Reservations.Any()) { dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000000", VehicleID = 2, RentalPricePerHour = 25, StartDate = new DateTime(2021, 1, 1), EndDate = new DateTime(2021, 1, 10), IsCarReturned = true, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 25 }); dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000000", VehicleID = 1, RentalPricePerHour = 10, StartDate = new DateTime(2021, 4, 12), EndDate = new DateTime(2021, 4, 20), IsCarReturned = false, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 10 }); dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000000", VehicleID = 5, RentalPricePerHour = 7, StartDate = new DateTime(2021, 5, 12), EndDate = new DateTime(2021, 5, 20), IsCarReturned = false, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 7 }); dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000000", VehicleID = 8, RentalPricePerHour = 4, StartDate = new DateTime(2021, 5, 12), EndDate = DateTime.Now, IsCarReturned = false, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 4 }); dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000001", VehicleID = 10, RentalPricePerHour = 9, StartDate = new DateTime(2021, 4, 12), EndDate = new DateTime(2021, 4, 18), IsCarReturned = false, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 9 }); dBContext.Reservations.Add(new DB.Reservation() { CPF = "00000000002", VehicleID = 4, RentalPricePerHour = 50, StartDate = new DateTime(2021, 4, 15), EndDate = new DateTime(2021, 4, 25), IsCarReturned = false, IsCarClean = true, IsCarDamaged = false, IsFuelTankFull = true, RentalPricePerHourAfterReturn = 50 }); dBContext.SaveChanges(); } }
public TripsController(ReservationsDbContext db) { Database = db; }
public HomeController(ILogger <HomeController> logger, ReservationsDbContext con) { _logger = logger; Context = con; }
public RegisterController(ReservationsDbContext db) { Database = db; }