Create a entity data model mapping to pocos that exists in another assembly and different namespaces
I have the following layout in my project (quite simplified):
Assembles
- App.WinClient <--- client
- App.Service.Api <--- Contains models/businessobjects and service interfaces
- App.Service <--- service implementation
Namespaces
I got the following namespace layout in App.Service.Api
- App.Users (contains User, IUserService etc)
- App.Messaging (contains Message, ISenderService, etc)
- App.Feeds (Feed, IFeedService, etc)
Problem
User and Message are the pocos that I want to use when creating a Entity Data Model in App.Service. But I can't manage to do that without manually edit then generated edmx since only one namespace can be specified in the Entity Data Model wizard.
Are there a开发者_StackOverflow中文版ny other solutions than manually edit the entity model after it being generated?
Edit Or do you think it's better to let the generator have it's way and place all pocos in the same namespace? Doesn't it suck if the database got many tables?
What you probably want here is the code-first entity framework CTP.
Don't have to specify the complete namespace, only the first part of it.
精彩评论