public FileService(ReservationDbContext context, IOptionsSnapshot <SiteSettings> siteSettings) { _context = context; _context.CheckArgumentIsNull(nameof(_context)); _siteSettings = siteSettings; _siteSettings.CheckArgumentIsNull(nameof(_siteSettings)); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IGreeter greeter, ReservationDbContext dbContext) { loggerFactory.AddConsole(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseAuthentication(); app.UseNodeModules(env.ContentRootPath); app.UseMvc(ConfigureRoute); app.Run(async(context) => { //var greet = greeter.GreetGuest(); await context.Response.WriteAsync(""); }); DatabaseInitializer.Initialize(dbContext); }
public UsersService(ISecurityService securityService, ReservationDbContext context) { _securityService = securityService; _securityService.CheckArgumentIsNull(nameof(_securityService)); _context = context; _context.CheckArgumentIsNull(nameof(_context)); }
public MemberController(IHostingEnvironment env, ReservationDbContext dbcontext, NPOLJwtTokenService tokensrv, ServiceConfig serviceConfig, SMSService smsService) { db = dbcontext; tokenservice = tokensrv; this.serviceConfig = serviceConfig; this.smsService = smsService; membersPath = Path.Combine(env.WebRootPath, "images", "members"); }
public static ReservationDbContext Create() { var options = CreateNewContextOptions(); var context = new ReservationDbContext(options); return(context); }
public ReservationController(ReservationDbContext dbcontext, NPOLJwtTokenService tokenservice, SMSService smsService, CultureContext cultureContext, ICaptchaProtectionProvider captchaProtectionProvider, IHumanReadableIntegerProvider humanReadableIntegerProvider) : base(cultureContext) { db = dbcontext; this.tokenservice = tokenservice; this.smsService = smsService; this.cultureContext = cultureContext; this.captchaProtectionProvider = captchaProtectionProvider; this.humanReadableIntegerProvider = humanReadableIntegerProvider; }
public static void SeedHostDb(ReservationDbContext context) { context.SuppressAutoSetTenantId = true; // Host seed new InitialHostDbBuilder(context).Create(); // Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); }
public DbInitializerService( IServiceScopeFactory scopeFactory, ISecurityService securityService, ReservationDbContext context) { _scopeFactory = scopeFactory; _scopeFactory.CheckArgumentIsNull(nameof(_scopeFactory)); _securityService = securityService; _securityService.CheckArgumentIsNull(nameof(_securityService)); _context = context; _context.CheckArgumentIsNull(nameof(_context)); }
public static void SeedUsers(UserManager <User> userManager, RoleManager <Role> roleManager, ReservationDbContext reservationDbContext) { if (userManager.Users.Any()) { return; } var contactTypes = new List <ContactType>() { new ContactType { Name = "ContactType #1" }, new ContactType { Name = "ContactType #2" }, new ContactType { Name = "ContactType #3" }, }; reservationDbContext.ContactTypes.AddRange(contactTypes); reservationDbContext.SaveChangesAsync().Wait(); var roles = new List <Role>() { new Role() { Name = Constants.RoleNameAdmin } }; roles.ForEach(role => roleManager.CreateAsync(role).Wait()); var adminUser = new User() { UserName = "******" }; userManager.CreateAsync(adminUser, "Password*123").Wait(); userManager.AddToRoleAsync(adminUser, Constants.RoleNameAdmin).Wait(); }
public TokenStoreService( ReservationDbContext uow, ISecurityService securityService, IRolesService rolesService, IOptionsSnapshot <BearerTokensOptions> configuration) { _uow = uow; _uow.CheckArgumentIsNull(nameof(_uow)); _securityService = securityService; _securityService.CheckArgumentIsNull(nameof(_securityService)); _rolesService = rolesService; _rolesService.CheckArgumentIsNull(nameof(rolesService)); _tokens = _uow.Set <UserToken>(); _configuration = configuration; _configuration.CheckArgumentIsNull(nameof(configuration)); }
public RoomReserveRepository(ReservationDbContext db) { Db = db; }
public SiteRepository(ReservationDbContext context) : base(context) { }
public HostRoleAndUserCreator(ReservationDbContext context) { _context = context; }
public GroupAuthenticationService(ReservationDbContext context) { _context = context; _context.CheckArgumentIsNull(nameof(_context)); }
public BookingsController(ReservationDbContext context) { _context = context; }
public ContactRepository(ReservationDbContext context) : base(context) { }
public UsersController() { this.dbContext = new ReservationDbContext(); }
public RequestManager(ReservationDbContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }
public OrganizationsController() { this.dbContext = new ReservationDbContext(); }
public InitialHostDbBuilder(ReservationDbContext context) { _context = context; }
public ContactController(ReservationDbContext context) { _context = context; }
public ReservationRepository(ReservationDbContext dbContext) : base(dbContext) { }
public RoomRepository(ReservationDbContext dbContext) { _dbContext = dbContext; }
public ServeListRepository() { _context = new ReservationDbContext(); }
public ProvinceService(ReservationDbContext context) { _context = context; _context.CheckArgumentIsNull(nameof(_context)); }
public BaseRepository(ReservationDbContext context) { _context = context; }
protected BaseRepository(ReservationDbContext dbContext) { currentDbcontext = dbContext; }
public CartLineRepository() { _context = new ReservationDbContext(); }
public OrderLineRepository() { _context = new ReservationDbContext(); }
public ServiceCategoryRepository(ReservationDbContext context) : base(context) { }