These are some of the features that have been added since the first release.
DefaultCommandType
- DefaultCommandType allows for setting the method by which the EasyObject will conduct database operations. There are two settings: CommandType.StoredProcedure and CommandType.Text.
- CommandType.StoredProcedure instructs the EasyObject to use stored procedures. CommandType.Text instructs the EasyObject to generate dynamic SQL.
- The DefaultCommandType can be set in the concrete class's constructor, so it becomes the default for that object.
- The Save method also has an overload that takes a CommandType, which will override the DefaultCommandType (but only for the Save operation).
- All database operations will execute within the current transaction scope, regardless of the CommandType setting.
IDENTITY Insert
- Allows the developer to specify a value for a column marked in the database as IDENTITY (in SQL Server) or using a SEQUENCE (in Oracle, which is support by EasyObjects).
- Typically used when transferring data from one database to another, or when adding static lookup data.
- Always performed with a dynamic query, no stored procedure support at this time.
Aggregates
- Allows the developer to construct dynamic queries that contain aggregate functions.
- Supported functions are AVG, COUNT, MAX, MIN, SUM, STDEV and VAR, but can vary by database provider.