Save entity contents in database table having different schema

Jan 24, 2014 at 6:17 PM
Edited Jan 24, 2014 at 7:53 PM
Hi,

Can you please tell me how we can specify custom schema for the table other then the default schema e.g "HR" instead of dbo? I tried table attribute on model entity to specify schema with table name but when i call AddGeneric function for that entity, it throws exception.

Thanks
Coordinator
Jan 27, 2014 at 7:47 AM
Specify the schema explicitly at the top part of the class

[Table("Users", Schema = "my schema name")]
public class User

I know you got the solution, but I am writing this here to benefit others who run in to similar issues.