Loading .edmx files at run time in class library RRS feed

  • Question

  • I'm doing a spot of research surrounding Entity Framework and its associated .edmx files.

    Our current setup has a number of these files compiled in to a library that we use extensively. Of course, this isn't exaclty an elegant solution - every time we want to update or add to something in the database layer, we need to recompile this library.

    We use stored procedures exclusively, and our current approach is to use the ExecuteFunction method on the object context. However, this does require knowledge of what imported functions from an edmx file return what type (context.ExecutionFunction<T>() returns ObjectResult<T>).

    My theoretical solution is to store any .edmx files we want to use at a relative path, and have the library load them all at run time.

    Has anybody tried this before? Does it work? Are there any performance considerations to take in to account? This would be used in an ecommerce environment, so efficiency and speed is important.

    Monday, August 15, 2011 11:45 AM