Our next EntitySpaces 2007 beta is at the door. In this beta we will have Medium Trust support and a few nice tweaks concerning finding our assemblies in the Visual Studio references dialogs. The EntitySpaces assemblies can now be installed in the GAC if you so desire.
Before installing EntitySpaces 2007 Beta v0.0415 we want you to uninstall any prior beta and then completely delete your EntitySpaces folder if you can. We strongly advise this so that our new installation layout doesn't intermix with your current files as the folder layout has changed somewhat.
If you accept the default path during installation the EntitySpaces assemblies will be found here:
The installer will also ad a few registry entries that cause the EntitySpaces assemblies to show up when you choose "Ad Reference" in Visual Studio, no need to browse. However, we do not install the EntitySpaces assemblies into the GAC during installation. You can do this of course for your installations as you roll out your application but there is no need, the ability is there of course.
Here is what you will see when you choose Add Reference in a non-Compact Framework application.
You might notice a few new assemblies, we'll get to those in a moment. The nice thing is there is no more browsing for these even though they are not installed in the GAC.
If you are working on a Compact Framework application here is what you will see when you choose "Add Reference" from within Visual Studio.
The ability to have your assemblies show up in the reference dialog requires that we make a registry entry. The installer has a checkbox for this that is "on" by default, you can uncheck it if you prefer to browse to your assemblies.
You probably noticed a few new assemblies above, specifically the "loaders". The loaders enumerate through all of your registered connection entries loading the appropriate EntitySpaces Providers to support each connection. There are two forms of the loader. The non-medium trust and the medium trust version. No matter which type of loader you use you will only need to ship the data providers that you actually use. Here are the two loaders.
It is our recommendation that you USE the medium trust loader. It is faster and will work in any environment. Your application will now require a one time call to assign the proper loader at program startup. Here is how we recommend that you do this in your code.
This is how our EntitySpaces Demo Application initializes the Loader (Windows Forms App)
namespace EntitySpacesDemo{ static class Program { [STAThread] static void Main() { esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Demo()); } }}
namespace EntitySpacesDemo{ static class Program { [STAThread] static void Main() { esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory();
Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Demo()); } }}
For an ASP.NET the best approach is probably to add a "Global Application Class" or Global.asax file. Here is an example"
<%@ Application Language="C#" %> <script runat="server"> void Application_Start(object sender, EventArgs e) { EntitySpaces.Interfaces.esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory(); } </script>
<%@ Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e) { EntitySpaces.Interfaces.esProviderFactory.Factory = new EntitySpaces.LoaderMT.esDataProviderFactory(); }
</script>
If you are using the configless support (as do our DotNetNuke users) then you want to assign your loader after your connections are registered.
The EntitySpaces Team--EntitySpaces LLCPersistence Layer and Business Objects for Microsoft .NET http://www.entityspaces.net/
Page rendered at Thursday, March 18, 2010 12:15:30 AM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.