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;
 }
Example #4
0
 public ReservationsController(ReservationsDbContext context)
 {
     _context = context;
 }
Example #5
0
 public AttendingsController(ReservationsDbContext context)
 {
     _context = context;
 }
Example #6
0
 public ImagesController(ReservationsDbContext context, IHostingEnvironment hostingEnvironment)
 {
     _context            = context;
     _hostingEnvironment = hostingEnvironment;
 }
Example #7
0
 public LoginController(ReservationsDbContext db)
 {
     database = db;
 }
Example #8
0
 public UserService(ReservationsDbContext context, IConfiguration configuration)
 {
     _context       = context;
     _configuration = configuration;
 }
Example #9
0
 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;
 }
Example #11
0
 public HomeController(ILogger <HomeController> logger, ReservationsDbContext con)
 {
     _logger = logger;
     Context = con;
 }
 public RegisterController(ReservationsDbContext db)
 {
     Database = db;
 }