THESE FORUMS ARE NOW FROZEN
Please choose "Forums" from the Main menu of www.entityspaces.net to get to our new forums.

EntitySpaces Demo

rated by 0 users
This post has 0 Replies | 0 Followers

Top 10 Contributor
Posts 178
ESAdmin Posted: 06-10-2007 9:11 AM | Locked

EntitySpaces Demo

See the "EntitySpaces Requirements" FAQ before installing the Trial. The EntitySpacesDemo is installed with the Trial Version. The source and solution (with runtime references removed) are, also, available from the Support -> Documentation -> Downloads menu page for customers who have uninstalled the Trial.

EntitySpacesDemo Solution

If you took the defaults during installation, the Visual Studio ("VS") solution (.sln) will be found in the C:\Program Files\EntitySpaces\EntitySpacesDemo folder. Double-click the file to start it in VS. The Demo is written in C#. The 45-day Trial Version runtime binaries are located in the EntitySpacesDemo\Runtime sub-folder. The EntitySpaces Compact Edition binaries are in the \CE folder below that.

Configuration

The EntitySpacesDemo uses an App.config file to hold the EntitySpaces configuration information. Double-click it in VS to open the file. The only thing you need to change to run the Demo against MS SQL Server Northwind, is the connectionString under the "SQLDynamic" section. NOTE: MyGeneration uses OleDB for its connection. If you copy your connection string from MyGeneration's Default Settings, be sure to delete the "Provider=SQLOLEDB.1;" part.

App.config

The Demo was generated using EntitySpaces Multi-Provider feature. See the "EntitySpaces Multi-Provider Mode" FAQ for details. If you have Northwind ported to MS Access, MySQL, or VistaDB, you can set those connectionStrings, too. If you do not, then leave them as they are. The default connection is also specified in App.config. It must match one of the named connections. In this case, the default is for MS SQL Server.

< connectionInfo default = " SQLDynamic " >

Build and Run

From the VS menu, click "Build" -> "Rebuild Solution". Start the Demo by clicking the green arrow on the VS toolbar, or "Debug" -> "Start Debugging" from the VS menu.

EntitySpaces Demo

Menu Choices

  • File
    • Exit
  • View
    • Refresh - This resets things so you can re-run an example.
  • Tools
    • Connection - The connection can be changed at runtime.
      • Microsoft SQL Server (default)
      • Microsoft Access
      • VistaDB
      • MySQL
    • Encrypt Config - Encrypts(Decrypts) the config file.
  • Help
    • About

Examples Tree

As you navigate and click on examples in the tree, a description of each will appear below. Some nodes are only descriptive, but for most you can click the "Run" button, and see EntitySpaces in action. Many of the Examples use DynamicQuery. Clicking the "View LastQuery" button after running an example, will display the SQL syntax that was sent to the database.

The Code

An attempt was made to separate the relevant EntitySpaces code from the Demo's UI code.

  • SampleCode.cs will contain most of what you are interested in.
  • Demo.cs mostly contains the UI clutter.
    • The constructor contains some commented code that shows how to use EntitySpaces without a config file.
    • The Form_Load has some code related to encrypting/decrypting the config file.
  • Program.cs contains the code for registering the EntitySpaces Loader, the recommended, medium trust LoaderMT, in this case.
  • Some of the examples call their own Form. This will be mentioned in the Description area and in SampleCode.cs. Viewing the code in those Forms will be very instructive.
  • The Custom and Generated folders contain the output produced by running those EntitySpaces Master templates from within MyGeneration. A few of the Custom classes contain code that demonstrates some ways you might use them for your own custom code. This will be mentioned in the example description and in SampleCode.cs.

Where to from here?

The best way to learn is by doing. Get your feet wet with the EntitySpacesDemo. Start your own solution against Northwind. The "Getting Started" PDF that was installed to your Start menu will guide you though your first project. Slowly build it up by adding more features. Use it as a quick and dirty test bed to experiment with features you are considering for your main project.

Your main point of reference will be the "EntitySpaces API" compiled help file that is installed to your Start Menu. A wealth of additional information, documentation, and sample code can be found on the menus on our Home page. Support is provided through these forums.

Page 1 of 1 (1 items) | RSS
Copyright © 2005 - 2009, EntitySpaces, LLC