Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: CodeFirst Fluent creating Table in wrong Schema when Schema-Name contains '.' [1023]

$
0
0
Probably related to issue 716

The following configuration is working as excepcted when accessing the existing table "MyTable" in Schema "My.Schema" via EF and null IDatabaseInitializer.
If you use Initializer to create table, e.g. DropCreateDatabaseAlways, it is creating the new table in the Schema "My" with table name "Schema.MyTable".
So it looks like it is using the Schema name until the first "." and the rest of the complete string "My.Schema.MyTable" becomes the table name.

```
public class MyConfig : EntityTypeConfiguration<MyModel>
{
public MyConfig()
{
this.ToTable("MyTable", "My.Schema");
}
}
```



Viewing all articles
Browse latest Browse all 10318

Trending Articles