/// <summary> /// Configure /// </summary> /// <param name="app"></param> /// <param name="env"></param> /// <param name="mBDbContext"></param> // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, MBDbContext mBDbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } mBDbContext.Database.EnsureCreated();//check if database exist | when database structure tables columns will not change //MBDbContext.Database.Migrate();// when database will change in the future app.UseMvc(); }
/// <summary> /// Base Repository Constructor /// </summary> /// <param name="mbdbcontext"></param> public BaseRepository(MBDbContext mbdbcontext) { _mBDbContext = mbdbcontext; }
/// <summary> /// Artist Repository Constructor /// </summary> /// <param name="context"></param> public ArtistRepository(MBDbContext context) : base(context) { }