Hi,
I addded table on database with model. however, if I change this model, how can I update database with code. I don't want to use this (add-migration "Add initial entity models" and update-database)
I can create if there isn't database -> context.Database.EnsureCreated();
my project is asp.net core 2,0
[code]
public void Configure(IApplicationBuilder app, IHostingEnvironment env, PSContext context)
{
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
context.Database.EnsureCreated();
}
[/code]