public DataService(gipDatabaseContext db, IVakService service, ILectorService lectorService, IAdministrationService adminService) { this.adminService = adminService; this.lectorService = lectorService; this.service = service; this.db = db; }
public void InitializeTestZone() { IServiceCollection serviceCol = new ServiceCollection(); sqliteConnection = new SqliteConnection("DataSource=:memory:"); serviceCol.AddDbContext <gipDatabaseContext>(options => options.UseSqlite(sqliteConnection)); ctxDb = serviceCol.BuildServiceProvider().GetService <gipDatabaseContext>(); ctxDb.Database.OpenConnection(); ctxDb.Database.EnsureCreated(); serviceCol.AddIdentity <ApplicationUser, IdentityRole>() .AddUserManager <UserManager <ApplicationUser> >() .AddRoleManager <RoleManager <IdentityRole> >() .AddSignInManager <SignInManager <ApplicationUser> >() .AddEntityFrameworkStores <gipDatabaseContext>() .AddDefaultTokenProviders(); serviceCol.AddSingleton <ILogger <UserManager <ApplicationUser> > >(new UserManagerLogger()); serviceCol.AddSingleton <ILogger <DataProtectorTokenProvider <ApplicationUser> > >(new DataProtectorLogger()); serviceCol.AddSingleton <ILogger <RoleManager <ApplicationUser> > >(new RoleManagerUserLogger()); serviceCol.AddSingleton <ILogger <RoleManager <IdentityRole> > >(new RoleManagerRoleLogger()); serviceCol.AddSingleton <ILogger <SignInManager <ApplicationUser> > >(new SignInManagerLogger()); userManager = serviceCol.BuildServiceProvider().GetService <UserManager <ApplicationUser> >(); roleManager = serviceCol.BuildServiceProvider().GetService <RoleManager <IdentityRole> >(); signInManager = serviceCol.BuildServiceProvider().GetService <SignInManager <ApplicationUser> >(); }
public AdministrationService(gipDatabaseContext db, RoleManager <IdentityRole> roleManager, UserManager <ApplicationUser> userManager) { this.db = db; this.roleManager = roleManager; this.userManager = userManager; }
public void InitializeTestZone() { var builder = new DbContextOptionsBuilder <gipDatabaseContext>(); builder.UseInMemoryDatabase("gipDatabase"); this.ctxDb = new gipDatabaseContext(builder.Options); if (ctxDb != null) { ctxDb.Database.EnsureDeleted(); ctxDb.Database.EnsureCreated(); } }
public PlannerService(gipDatabaseContext db) { this.db = db; }
public VakService(gipDatabaseContext db) { this.db = db; }
public LectorService(gipDatabaseContext db) { this.db = db; }
public FieldOfStudyService(gipDatabaseContext db) { this.db = db; }
public LokaalService(gipDatabaseContext db) { this.db = db; }