Ejemplo n.º 1
0
 public UsersController(CarWashContext context, ILogger <UsersController> logger, UserManager <User> userManager, SignInManager <User> signInManager)
 {
     _context       = context;
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = logger;
 }
Ejemplo n.º 2
0
 public UnitOfWork(CarWashContext context)
 {
     _context              = context;
     CustomerRepository    = new GenericRepository <Customer>(context);
     CarRepository         = new GenericRepository <Car>(context);
     OperationRepository   = new GenericRepository <Operation>(context);
     GateRepository        = new GenericRepository <Gate>(context);
     ReservationRepository = new GenericRepository <Reservation>(context);
     CarBrandRepository    = new GenericRepository <CarBrand>(context);
     CarModelRepository    = new GenericRepository <CarModel>(context);
 }
Ejemplo n.º 3
0
        public static List <Statistic> GetData()
        {
            List <Statistic> stats = new List <Statistic>();

            using (var context = new CarWashContext())
            {
                foreach (var stat in context.Statistics)
                {
                    stats.Add(stat);
                }
            }
            return(stats);
        }
Ejemplo n.º 4
0
 public AfterloginController(CarWashContext context)
 {
     _context = context;
 }
Ejemplo n.º 5
0
 public GenericRepository(CarWashContext _context)
 {
     this._context = _context;
     table         = _context.Set <T>();
 }
Ejemplo n.º 6
0
 public CarsController(CarWashContext context)
 {
     _context = context;
 }
Ejemplo n.º 7
0
 public LocationsController(CarWashContext context)
 {
     _context = context;
 }
 public ReservationsController(CarWashContext context)
 {
     _context = context;
 }
Ejemplo n.º 9
0
 public TypesController(CarWashContext context)
 {
     _context = context;
 }