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

Commented 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");
}
}
```


Comments: Fixed in changeset 87cc1380442d9f96e14a5610d6e7160ef6ba3215

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>