Forum Discussion
apenaranda
3 years agoPost Partisan
web.config file in hosting
Hello, I have in visual studio the program "RowLevelSecurityDemo" which embeds powerbi and you can create different roles. In the web.config file I have it as follows: <connectionStrings>
...
apenaranda
3 years agoPost Partisan
Actually the connectionStrings is correct but what I want is that it does not create the database, which is the error that I get earlier. I want to directly create the tables...
I don't understand much but I think it does it in these lines although I don't know very well in which part it creates the database
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
Database.SetInitializer(new IdentityDropCreateInitializer());
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
public class IdentityDropCreateInitializer :
DropCreateDatabaseAlways<ApplicationDbContext>
{