开发者

Name conflicts in Entity Framework using database schemas?

I have these two tables in my database:

client.Employee

employee.Employee

When I try to import this into entity framework I get two table objects created:

Employee

Employee1

Is there a way to handle 开发者_JAVA技巧naming conflicts that will work better than this? And really, I would prefer that my schema is represented some how for non conflicting tables as well.


Unfortunately no. Information about schema is only included in storage description (SSDL) and it is not passed to conceptual model (CSDL) so in conceptual model you have two entities named Employee and EF is using the most basic way to resolve that. Another problem is that this probably cannot be modified because generating model from database is not driven by any T4 template which can be changed whereas reverse processing (generating SQL database creation script from model) is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜