private void UpdateDatabase(IApplicationBuilder app) { using (IServiceScope serviceScope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { using (RJMContext context = serviceScope.ServiceProvider.GetService <RJMContext>()) { context.Database.Migrate(); } } }
/// <summary> /// The constructor of the Job repository. /// </summary> public JobRepository(RJMContext context) : base(context) { this.context = context; }
/// <summary> /// The constructor of the SkillAlias repository. /// </summary> public SkillAliasRepository(RJMContext context) : base(context) { this.context = context; }
/// <summary> /// The constructor of the Document repository. /// </summary> public DocumentRepository(RJMContext context) : base(context) { this.context = context; }
/// <summary> /// The constructor of the ResumeSkill repository. /// </summary> public ResumeSkillRepository(RJMContext context) : base(context) { this.context = context; }