Creating separate namespaces by table prefix?

Posts   
 
    
katit
User
Posts: 2
Joined: 04-Sep-2011
# Posted on: 04-Sep-2011 21:19:56   

I wonder if this is possible.

I have tables named with 3 letter prefix that is abbreviation of "module". Like

MBLDevice LOCAddress MEMUser

I wonder if LLBGen can generate entities with appropriate namespaces like:

MyProject.Data.Mobile.Device MyProject.Data.Location.Address MyProject.Data.Membership.User

I'm working with EF4.1

Thanks!

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 05-Sep-2011 11:11:27   

Will entities from different modules have relations?

katit
User
Posts: 2
Joined: 04-Sep-2011
# Posted on: 05-Sep-2011 17:15:47   

Walaa wrote:

Will entities from different modules have relations?

Yes, and I want them to share same context

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 05-Sep-2011 18:58:49   

You can sepearate them into different assemblies (i.e. different namespaces) using Grouping. But this won't allow you to have relations between them.

To have relations between them, you need to have them in the same namespace, and so if you can accept the following:

MyProject.Data.MobileDevice
MyProject.Data.LocationAddress
MyProject.Data.MembershipUser

The above can be achieved using Abbreviations (check the "Abbreviations Tab" section)