public IModelContext Create(string connectionString, bool startTrackingChanges) { var context = new PHmiModelContext(connectionString); if (startTrackingChanges) context.StartTrackingChanges(); return context; }
public IModelContext Create(string connectionString, bool startTrackingChanges) { var context = new PHmiModelContext(connectionString); if (startTrackingChanges) { context.StartTrackingChanges(); } return(context); }
public IModelContext Create(string connectionString) { var entityConnection = new EntityConnection( new MetadataWorkspace( new [] { "res://*/" }, new [] { Assembly.GetAssembly(typeof(PHmiModelContext)) }), new NpgsqlConnection(connectionString)); var context = new PHmiModelContext(entityConnection); context.StartTrackingChanges(); return context; }
public IModelContext Create(string connectionString) { var entityConnection = new EntityConnection( new MetadataWorkspace( new [] { "res://*/" }, new [] { Assembly.GetAssembly(typeof(PHmiModelContext)) }), new NpgsqlConnection(connectionString)); var context = new PHmiModelContext(entityConnection); context.StartTrackingChanges(); return(context); }