• .NET

    Custom Code Generation

    July 23, 2010 Share
    The good thing about the code generation is that you can easily modify it to suite your needs. Today I will show you how to modify the code generation template so that it generates string properties that HtmlEncode and HtmlDecode the values in their respective setter and getter. The desired outcome will look like :  private string firstName;   public virtual string FirstName  {      get     {         return HttpContext.Current.Server.HtmlDecode(this.firstName);     }     set     {         this.firstName = HttpContext.Current.Server.HtmlEncode(value);     } } You can achieve this in a couple of steps. First we need to locate the T4 templates that OpenAccess uses. The C# templates are usually located under C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl\CodeGenerationTemplates\CSharp. Note that it would...
  • .NET

    Usability tips with OpenAccess

    July 22, 2010 Share
    As solutions get more complicated every day so does the domain model. Navigating in the designer can become quite frustrating if you have a rather large database with 100+ tables. There is however a light at the end of the tunnel.  There are a few often overlooked features of the designer that can make your life easier when dealing with large models.  First of all you should get familiar with search bar on top of the Model Explorer and the Schema Explorer. It is the easiest way to find a class or a table by its name. So what do you do...
  • .NET

    New Fetch Optimization API

    July 21, 2010 Share
    In this blog post we will introduce the new intuitive and powerful Fetch Optimization API. Users familiar with the LINQ to SQL data load options will feel very comfortable with our API. If you don’t have a clue what this is all about, here we will give an overview of the basic concepts behind the usage of fetch strategies. In short, fetch strategies help you optimize your retrieval of objects from the database. They allow you to specify properties in a persistent object that are retrieved together whenever you invoke a call to the persistent object. Let’s consider the following example...
  • .NET

    OpenAccess ORM Upgrade Model Tool

    July 16, 2010 Share
    As we all know Q1 introduced a complete new face of OpenAccess ORM. That of course brought some uncertainties between our older customers that had already built their projects based on models generated by the Reverse Mapping Wizard. Well in Q2 amongst all the other goodies, we are introducing a new Upgrade Model Tool which is targeted for older projects which are still in the phase of development. What is the idea behind it - basically it converts all of your persistent classes into one Entity Diagram where you can continue working with your domain model in this great Visual...
  • .NET

    Where are the OpenAccess menu entries gone?

    July 15, 2010 Share
    With the new visual designer the old wizards are now hidden and not immediately usable. The recommended way is to use the Doman Model. All new functionality is now reachable from the new OpenAccess menu:     The options menu entry is enabled if a solution is opened.   The old wizards are not deprecated and will not be removed in one of the next releases, but you have to specify on a solution level that you want to use them.   In your existing projects the upgrade to the new version can be done by using the ‘Check Settings’ wizard, which will replace the references to the old...