• .NET

    Tips on working with large models : Code Generation

    August 18, 2010 Share
    Say you have a large model with more than 500 mapped tables. Surely you will notice how the designer becomes a little unresponsive on saving. There is a simple explanation for this.  By default OpenAccess generates a file per class. Everytime you perform a save on the document code generation of all files is performed. This is basicaly generating content for each and every file, comparing this contect with the one from the old file if available, and based on that writing it to the file system. And let’s of course not forget that we should also take into account the...
  • .NET

    Defining hierarchical domain models - Part Two

    August 10, 2010 Share
    The first blog post on this topic described how to create a domain model from an existing database and set inheritance relations between the generated classes. It was also shown how to use vertical mapping. In this post however, the focus is on the flat strategy (multiple classes mapped to one table) and forward mapping. Let's add some new classes to the model from the previous post: The new classes - Coupe and Lomousine, will be mapped to the table of the Car class. To do that, select each of the new classes and change the "Mapped to" option in the Details Editor...
  • .NET

    Defining hierarchical domain models - Part One

    August 09, 2010 Share
    With the 2010 Q2 release of Telerik OpenAccess ORM we introduced a lot of new features, including forward mapping capabilities for the visual designer. This makes the life much easier when it comes to defining a domain model which contains classes in a hierarchy. Until now it was only possible to use the vertical strategy for mapping a class hierarchy but in Q2 we have enabled the flat strategy as well. Any combination of flat and vertical mapping is also supported. This leaves the horizontal strategy as the last one to be supported, probably later this year. Now let's see how those things...
  • .NET

    Forward mapping a model with associations

    July 29, 2010 Share
    In this post we will discuss how to add associations in a forward mapping scenario with our Visual Designer. We will start from scratch and build a model with two entities – Category and Product where each Product belongs to at most one Category (a zero-or-one-to-many relationship from the categories to the products). 1. In the solution explorer right-click your project (where you want to add the persistent types) and select OpenAccess -> Add Domain Model. We will create an empty model.     2. The next step is to create a new database which we will name WarehouseDB. Creating a brand new database can be achieved...
  • .NET

    The new Telerik OpenAccess Schema Update wizard

    July 26, 2010 Share
    One of the new features of Telerik OpenAccess ORM Visual designer is the forward mapping wizard that can be used to update the database schema from the model. Yes it is true! With just few clicks you are able to generate and execute either a schema definition or schema update script that will alter you database schema. First you will need to open our Schema Update Wizard. You can do this by either right clicking in the schema explorer or in the model explorer: the command is named Update Database from Model… This will open the following page: On the first page you...