Telerik blogs

Latest

  • Productivity

    Using Telerik OpenAccess ORM in N-Tier applications

    Hello, by means of introduction, my name is Alexander Filipov and I am working as a developer for the Telerik OpenAccess team. In my first post I would like to share some thoughts about using Telerik OpenAccess ORM in advanced n-tier web applications. Undoubtedly, the main goal in such architectures is to lose-couple the tiers from each other, so the code is modular and easier to maintain. Here comes the question how Telerik OpenAccess ORM fits into this scenario and which are the layers that it should be used in. The optimal approach is to have not...
    May 27, 2021 2 min read
  • Productivity

    Editing Telerik OpenAccess ORM class-generating templates

    Telerik OpenAccess ORM uses a set of templates to generate classes from a database schema. These templates are nothing special but class definitions with a lot of placeholders that are being replaced with real values to produce buildable source code. Using templates gives us the ability to fully customize our reverse mapped classes. I am going to demonstrate how we can edit the templates so the generated classes will implement the INotifyPropertyChanging and INotifyPropertyChanged interfaces. All class-generating templates take place in the “C:\Program Files\Telerik\OpenAccess ORM\sdk\IDEIntegrations\templates\PCClassGeneration” directory. Navigate to it and open the “default.vm” file under the “\cs\templates\classgen\class” subfolder. This...
    May 27, 2021 2 min read
  • Productivity

    Model First or Schema First

    Telerik OpenAccess ORM let you work your preferred way: either you start with your object model and Telerik OpenAccess ORM generates/maintains your database schema for you, or just start with your existing schema and let Telerik OpenAccess ORM reverse map it to a new object model.   Telerik OpenAccess ORM provides support for both approaches for years and it will get even better by providing complex functionalities out of the box like Roundtrip Mapping (see below). Because we are getting requests for ‘Model First’ functionalities by our customers, and this is the way the upcoming version of Entity Framework names the Forward mapping...
    May 27, 2021 3 min read
  • Productivity

    Mocking the Data Access Layer with Telerik OpenAccess ORM

    Unit testing the DAL has always resulted in a debate: whether to mock or not the Data Access Layer. Indeed, there are cases were the DAL cannot be legally tested without hitting the real production database (requires integration testing). The goal behind that is to assure us of the behavior of some database server specific features like primary key generation, handling schema alternations with pre-populated data, triggers, etc.. However for testing the Business Logic Layer , the validation logic or the presentation layer, it is fair to say that accessing the database is...
    May 27, 2021 3 min read
  • Productivity

    Using Stored Procedures for CRUD

    Telerik OpenAccess ORM generates dynamic SQL to perform CRUD operations. If for some reason you are not comfortable using dynamically generated SQL or your company policies allow data manipulation only via stored procedures, fear not. Telerik OpenAccess ORM supports CRUD operations via stored procedures too – currently only for MS Sql Server, but soon for the other backends also.  Stored procedure usage in Telerik OpenAccess ORM can be classified into 2 categories – Mapping existing stored procedures and instructing Telerik OpenAccess ORM to use them instead of generating dynamic SQL Letting Telerik OpenAccess ORM generate and use the required stored procedures based...
    May 27, 2021 4 min read