0
FahrettinOzturk created
Hello all,
The migration tool creates all needed tables on PostgreSql database in "Public" schema which is default. I couldn't see any schema name property in config files. Can we change the name of the schema?
Thanks.
1 Answer(s)
-
0
Here are some information about modifying table schema
modelBuilder.Entity<Blog>() .ToTable("blogs", schema: "blogging"); class MyContext : DbContext { public DbSet<Blog> Blogs { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.HasDefaultSchema("blogging"); } }
More reference documents : [https://docs.microsoft.com/en-us/ef/core/modeling/relational/tables]) [https://docs.microsoft.com/en-us/ef/core/modeling/relational/default-schema])