//ObjectContext db; // No public parameterless constructor //private EntityExchangeFactory() { } //public EntityExchangeFactory(ObjectContext db) //{ // this.db = db; //} public static EntityExchange <TEntity, TId> GetEntityExchange <TEntity, TId>(ObjectContext db) where TEntity : EntityObject, new() { EntityExchange <TEntity, TId> exchange = new EntityExchange <TEntity, TId>(db); return(exchange); }
protected void Initialize(ObjectContext objectContext) { EntityExchange <TEntity, int> exchange = EntityExchangeFactory.GetEntityExchange <TEntity, int>(objectContext); Initialize(exchange); }