c# - How can I initialize DataSpace.SSpace and DataSpace.CSpace generically? -
i'm creating general-purpose ef model browser, model loaded selecting dll, using reflection instantiate objectcontext.
that part working - problem operations require dataspace.sspace , dataspace.cspace failing , i'm trying figure out how these initialized in generic fashion run-time ef utility metatadata query functions use them work.
is there way initialize metadata information while having dll available (edmx not available).
thanks in advance leads.
thanks julie lerman, craig stuntz, , hadi hariri, able find solution, using syntax revealed in http://social.msdn.microsoft.com/forums/en-us/dd7b1c41-e428-4e29-ab83-448d3f529ba4/creating-an-entity-connection-from-a-sql-connection. may not optimal, works:
var workspace = new metadataworkspace(new string[] { "res://*/" }, new assembly[] { assemblycontainingyourmodel });
i tried using metadataworkspace.loadassembly() resulted in:
the space 'ospace' has no associated collection.
Comments
Post a Comment