user2559122
user2559122

Reputation: 1

How to define the database schema name in EF CTP 5

I am using CTP 5 with existing database. Tables are created under a schema different than dbo. The SQL generated by the DbContext is using dbo. How do I make the DbContext use the correct schema name?

Upvotes: 0

Views: 531

Answers (1)

Kralizek
Kralizek

Reputation: 2063

ToTable has an overload which accepts two strings: the first is the name of the table and the second the name of the schema. The same possibility is offered by the attribute used to decorate the class.

Upvotes: 1

Related Questions