I created two edmx files and have to contexts.
Is there a problem with doing something like:
public DataManager
{
protected ObjectContext _context;
public DataManager(ObjectContext context)
{
_context = context;
}
}
or is it better to have an overloaded construtor:
public DataManager
{
protected db1entities _context;
protected db2entities _context2;
public DataManager(db2entities context)
{
_context = context;
}
public DataManager(db2entities context)
{
_context2 = context;
}
}
I noticed if I do it the first way, then the context does not know about my entities, where as it does if I explicitly specify the context