I\'m sure I\'ve done this before at some stage, but I can\'t figure out how to now! My scenario:
// This is generated from EDMX public partial class HOLDbEnt
The best I can suggest is a factory method:
private HOLDbEntities(string contextName) : base(contextName) { } public static HOLDbEntities Create() { return new HOLDbEntities(ContextName); }
and use HOLDbEntities.Create() rather than new HOLDbEntities().
HOLDbEntities.Create()
new HOLDbEntities()