public UserService( LearningSystemDbContext db, IPdfGenerator pdfGenerator) { this.db = db; this.pdfGenerator = pdfGenerator; }
private LearningSystemDbContext GetDatabase() { var dbOptions = new DbContextOptionsBuilder <LearningSystemDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) // Or we can use some TestName with GUID new Db .Options; var db = new LearningSystemDbContext(dbOptions); return(db); }
public AccountController( UserManager <User> userManager, SignInManager <User> signInManager, IEmailSender emailSender, ILogger <AccountController> logger, LearningSystemDbContext db) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; this.db = db; }
public FileService(LearningSystemDbContext db, IPdfGeneratorService pdfService) { this.db = db; this.pdfService = pdfService; }
public CourseService(LearningSystemDbContext dbContext) { _dbContext = dbContext; }
public AdminUserService(LearningSystemDbContext db) { this.db = db; }
public AdminUserService(LearningSystemDbContext database, UserManager <User> userManager) { this.database = database; this.userManager = userManager; }
public ArticleService(LearningSystemDbContext db, IMapper mapper) : base(db, mapper) { }
public ArticleService(LearningSystemDbContext dbContext) { this.dbContext = dbContext; }
public AdminUserService(LearningSystemDbContext db, UserManager <User> userManager, RoleManager <IdentityRole> roleManager) { this.db = db; this.userManager = userManager; this.roleManager = roleManager; }
public IdentityController(LearningSystemDbContext db) { this.db = db; }
public AdminService(LearningSystemDbContext db) => this.db = db;
public AdminCourseService(LearningSystemDbContext database) { this.database = database; }
public ProfileService(LearningSystemDbContext db) { this.db = db; }
public BlogArticleService(LearningSystemDbContext db, IMapper mapper) { this.db = db; this.mapper = mapper; }
public CommentService(LearningSystemDbContext db) { this.db = db; }
public UsersService(LearningSystemDbContext db) { this.db = db; }
public AdminUserService(LearningSystemDbContext db, IMapper mapper) { this.db = db; this.mapper = mapper; }
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, LearningSystemDbContext dbContext) { // Database migrations app.UseDatabaseMigration(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); app.UseDatabaseErrorPage(); dbContext.Database.EnsureCreated(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { ////Users Profile Route //routes.MapRoute( // name: "profile", // template: "users/{username}", // defaults: new // { // controller = "Users", // action = nameof(UsersController.Profile) // }); ////Friendly URL blog article routing //routes.MapRoute( // name: "blog", // template: "blog/articles/{id}/{title}", // defaults: new // { // area = WebConstants.BlogArea, // controller = "Articles", // action = nameof(ArticlesController.Details) // }); // Areas Routing routes.MapRoute( name: "areas", template: "{area:exists}/{controller=Home}/{action=Index}/{id?}"); routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public CourseService(LearningSystemDbContext db, IMapper mapper) { this.db = db; this.mapper = mapper; }
public BlogArticleService(LearningSystemDbContext db) { this.db = db; }
public TrainerService(LearningSystemDbContext dbContext) { _dbContext = dbContext; }
public AdminUserService(LearningSystemDbContext db, UserManager <User> userManager) { this.db = db; this.userManager = userManager; }
public BlogArticleService(LearningSystemDbContext database) { this.database = database; }
public TrainerService(LearningSystemDbContext db) { this.db = db; }
public ArticleSercice(LearningSystemDbContext db) { this.db = db; }
public CourseService(LearningSystemDbContext db) { this.db = db; }
public TrainerService(LearningSystemDbContext database) { this.database = database; }
public AdminCoursesService(LearningSystemDbContext db) { this.db = db; }
public TrainerService(LearningSystemDbContext db, IMapper mapper) : base(db, mapper) { }