Friday, November 21, 2008
Frequently Asked Questions
Minimize

What is an O/RM?

An O/RM is short for Object/Relational Mapper, and it's basically a technique of mapping database tables to business objects in your application. For example, if you have a Customers table, you would also have a Customers object that allows developers to interact with the data going back and forth to the Customers table in the database. Columns in the database become typed properties of the object, and usually there are additional helper functions that make working with the database easier.

What is the Enterprise Library?

The Enterprise Library comes from Microsoft's Patterns & Practices group. The library started life as a single class called SqlHelper, which contained some shortcut functions that allowed developers to spend less time writing data access code. Over time, it has grown into a rather large library with several different features, not just for data access but also for Caching, Encryption, Logging and runtime Validation. While the Data Access Application Block (or DAAB) has come a long way, in our opinion it needed something extra to take things to the next level. So we created EasyObjects.NET.


For more information about the Enterprise Library, see Microsoft's MSDN site.

What is code generation?

Code generation is another technique where you use an automated process to generate code, usually from some kind of meta-data. Since we are creating a data-access layer, EasyObjects.NET uses your database schema to generate the necessary classes and stored procedures (if you decide to use them). Now here's the important part: if your database schema changes, all you have to do is regenerate your classes and procedures. What usually takes at least an hour to code by hand, code generation gets the job done in minutes!


EasyObjects.NET recommends MyGeneration for all your code generation needs.

Can I use EasyObjects.NET in my VB.NET project?

Yes, you absolutely can! Eventhough both the Enterprise Library and EasyObjects.NET are written in C#, you can still use them in your VB.NET project (or any other CLR-compliant language, for that matter). Just add a reference to the EasyObjects DLL and the Enterprise Library DLLs as described in our Getting Started guide. If you are using Visual Studio, you also have the option of adding the EasyObjects project directly to your solution.

When I generate my business objects, I get a lot of compiler errors about "cannot convert from 'System.Data.SqlDbType' to 'System.Data.DbType'." What is wrong?

This is caused by selecting SqlClient or another database-specific client as the DbTarget in MyGeneration's Default Settings. You might think that if you are using SQL Server or Oracle as your database, you have to use SqlClient or OracleClient as your database target when generating EasyObjects. But the Enterprise Library promotes database-independent coding, so for it's external methods the EL uses the generic DbType enumeration and not a database-specific target.


Change your DbTarget setting in MyGeneration to DbType, regenerate your business objects and this error will go away.

Will you support 'xxx' database?

Upon initial release, only SQL Server and Oracle will be supported. New databases will be added as time allows. Current plans are to support Microsoft Access, MySql, VistaDB and Firebird. Others on the radar include PostgreSQL, DB2 and SQLite. No release dates are available at this time.

 

Update: User 'zobi' has ported EasyObjects to the DB2 platform. This version is unsupported, but if you are using DB2 you can contact him for the code through the MyGeneration site. Here is the forum post with more information:
http://www.mygenerationsoftware.com/phpBB2/viewtopic.php?p=9830


Print  

Powered by MyGeneration
Privacy Statement  |  Terms Of Use
© 2007 Noonan Consulting Inc.