Anyone suggest me how to handle the following scenario. I have some Db tables that are using in all of my projects so I am creating all these tables in every database (common tables + project tables). Now I have a common data and business libraries that depend on the common tables, I need to split these table entities into two different libs with a single DbContex. I 开发者_C百科am using the dependency injection to pass the db context.
I am using the following Vs tools. EF 4.1 VS 2010.
Regards, Hareen.
You can either use inheritance like below or
public class CommonContext:DbContext
{
}
public class ProjectContext:CommonContext
{
}
Composition like this. (The answer I have given for your earlier question
精彩评论