FAQ

About Olero

 
  Who is Olero Software?
  What is ORM.NET?
  Why should I use ORM.NET?
  How much does ORM.NET cost?

 

Using ORM.NET Code Generator

 
  What databases can I use ORM.NET with?
  How do I generate my data model?
  Can I customize the names of the objects or properties generated?
  Can I change the accessibility of the properties within the objects generated?
  Can I customize how the related objects appear within the model?
  What if we have more than one developer working with the same database?
  If my schema changes, will I lose my changes if I regenerated the data objects?

 

Using ORM.NET Generated Code and ORM Library

 
  How do I fetch data from the database?
  What does the DataManager do?
  Will I still need to write SQL queries or stored procedures?
  How do I add criteria for my query?
  What if the criteria I want to add for a query requires that a join be done?
  How do I use the objects returned by the DataManager?
  How do I add new objects to create rows in the database?
  How do I delete rows?
  Does it call a separate SQL command and do a roundtrip for each row inserted or changed?

 

  Who is Olero Software?   back to top
Olero Software is a small company specializing in developing cutting edge products built specifically for the Microsoft.NET Platform. We are based in Boulder, Colorado, and currently employee a small team of six developers.
   
  What is ORM.NET?   back to top
ORM.NET is an Object Relational Mapper package built for the .NET platform. Object Relational Mapping automates the process of connecting your object library with your Database, so that programmers do not have to write code to access a generic Data Library, such as ADO or ADO.NET, and do not have to write any SQL.
   
  Why should I use ORM.NET?   back to top
Using ORM.NET will save you hours and hours of development and debugging time, which means you can get more done in less time. It will also make it a lot easier to develop a clear, consistent set of object-based code that is easy for your customers and coworkers to modify or resuse.
   
  How much does ORM.NET cost?   back to top
ORM.NET is free.
   
  What databases can I use ORM.NET with?   back to top
ORM.NET currently only supports SQL Server 2000.
   
  How do I generate my data model?   back to top
After you have downloaded the trial or fully licensed product, launch the ORM.NET UI from the start menu, or desktop shortcut. Simply connect to your database, and click generate. Its that simple (although if you wish, there are numerous options to customize the generated code). To learn more, view one of the online demos on our web site.
   
  Can I customize the names of the objects or properties generated?   back to top
Yes, you can customize the object and property names that are generated. By default, they will by named the same as the corresponding database table or column.
   
  Can I change the accessibility of the properties within the objects generated?   back to top
Yes, you can supply a scope modifier (private, public, protected, etc) for the generated properties on each class. So, for example, if you want the BalanceDue property of the invoice object to be read only, you can set that.
   
  Can I customize how the related objects appear within the model?   back to top
Yes, by default all related objects are mapped as a one-to-many relationship. This means that if you have a Customer table with a child Invoice Table, by default, the Customer object will have a collection of Invoice children. You can mark the relationship as one-to-one, which would instead generate a Customer object that has a single Invoice property.
   
  What if we have more than one developer working with the same database?   back to top
Simply store the schema settings file, located in the schema subfolder of your ORM.NET installation in your source control package (SourceSafe, etc) or if you do not use source control, you can copy it from a network share.
   
  If my schema changes, will I lose my changes if I regenerated the data objects?   back to top
No. The generated code is created in a different set of files from the files that you work on. The "business objects" are located in the root of the generated project and can be modified by you. They will only be generated once. The files in the "do_not_edit" folder will be regenerated every time you run, and should not be modified manually.
   
  How do I fetch data from the database?   back to top
Use the DataManager class, generated with your solution, to fetch any data you wish from SQL. You do not have to write any SQL. It supports fetching data from multiple tables, based on criteria off multiple tables. To learn more, read the online documentation.
   
  What does the DataManager do?   back to top
The DataManager is the bridge between your SQL Database, and your generated object library (with their derived business objects). It handles the retrieval of all data, and will automatically commit back any changes made by you, to the objects, including inserts, updates, deletes, on any one or more of the tables.
   
  Will I still need to write SQL queries or stored procedures?   back to top
No, you do not have to write any SQL or stored procedures, the DataManager will generate all necessary SQL. If you have legacy stored procedures however, ORM.NET will automatically generated function wrappers for them, to make them easier to call from your code.
   
  How do I add criteria for my query?   back to top
The DataManager contains a QueryCriteria property with And, Or, And NewGroup methods to facilitate building any type of query from simple one table queries, to complex multi-table joins. The And and Or method take as parameters a JoinPath column object, representing the column to apply the criteria to, and the data to match against, as well as an optional MatchType enumeration. For more information, see the documentation.
   
  What if the criteria I want to add for a query requires that a join be done?   back to top
You can use the generated JoinPath class, which will let you navigate joins as easily as accessing properties on an object. (I.e., JoinPath.Customer.Invoice.InvoiceDetails). For more information, see the online documentation.
   
  How do I use the objects returned by the DataManager?   back to top
The objects returned by the DataManager are the one-time generated business objects which you can modify. You use them as you would any other object representing your business. The properties of the objects will correspond to the columns, and other related objects, in the system. You can use intellisense to navigate the whole schema if you wish!
   
  How do I add new objects to create rows in the database?   back to top
Use the DataManager class, and call the New[Object]() method where [Object] is the type of row you want to create. If there are any required parameters when creating a row of this type, the DataManager will prompt you for them on the constructor.
   
  How do I delete rows?   back to top
Every object contains a Delete() method you can call to delete that underlying row.
   
  Does it call a separate SQL command and do a roundtrip for each row inserted or changed?   back to top
No, all fetches are batched into a single roundtrip to the database, when you call a Get[Object]() method on the DataManager. Similarly, the CommitAll() method on the DataManager generates a single, transactional SQL batch statement to commit all the changes.