Table Schema Adapter for POCO

Aug 19, 2011 at 1:29 PM

When using the POCO template I made the other changes from the previous discussions, plus had to use the overloaded constructor that includes the container name.  After modifying the t4 template the main constructor looked like the following:

	public MyEntities(string schema = "dbo")
            : base(ConnectionString, ContainerName,
                new ConnectionAdapter(new TableSchemaModelAdapter(schema),
            this.ContextOptions.LazyLoadingEnabled = true;

Usage looks like ...

using (vat ctx = new MyEntities("OtherSchema"))