Entity Framework doesn't use users default schema

On my SQL Server I have a user called "preview" which has the default schema "preview". Even though I have this user in my connection string, the Entity Framework always uses the dbo schema. Is this normal behaviour or is something wrong with my SQL server configuration?

I know I could define a different schema with the TableAttribute or the ModelBuilder but I really try to avoid that.


Yes for EF version <=5. There will be new features in EF6 to achieve what you need. See here for explanation, under DbModelBuilder.HasDefaultSchema


Need Your Help

Matching lines with parentheses before double backslashes using regex in AWK

regex awk gawk

I've got an AWK script and I'm trying to check if lines coming into it have an ( but only if its before // or there is no // (its C code, so basically seeing if something happens before the comment...

Get nested JSON

javascript json

How can I get the 'value' inside the 'cost'? Please help me, I just learned JSON from w3schools. I have tried, but it didn't work. My code for get the 'value' is in the bottom of the code.