Telerik blogs
  • 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
  • Productivity

    LINQ 101 Examples with Telerik OpenAccess ORM

    We all know that today LINQ is the most popular and easy way for processing data in the .NET community. In fact you can use almost all data sources you might think of: plain objects, XML or relational databases. While we have been offering an extensive LINQ support for months now, and we are continuously improving it, I don’t think it received the credit it deserves. So we decided to foster the awareness of our community towards the great LINQ support we provide with the Telerik OpenAccess ORM tool. Ok, easier said than done. What approach should we take with this one? A...
    May 27, 2021 2 min read
  • Productivity

    Handling concurrent database operations with Telerik OpenAccess ORM

    What usually is of great importance to developers that use ORM tools, are issues related to concurrent updates or deletes that can potentially cause a valuable loss of data, and how the ORM framework handles the cases. Because of the state-less nature of HTTP the object-scope is re-initialized on every postback. That is an operation on its own, future blog-posts will cover some of the best practices approaches to object scope life-cycle management. The problem with stateless scenarios is that all change-tracking that the object-scope does for us in a desktop scenario is lost on every postback so there is a...
    May 27, 2021 3 min read
  • Productivity

    Replay: OpenAccess ORM Advanced Topics Webinar

    Yesterday I delivered a webinar which covered some advanced OpenAccess ORM topics. If you missed it, the webinar was recorded and is now available on Telerik TV for your viewing pleasure. For this webinar, I discussed the mechanisms available in OpenAccess to allow developers to implement object-oriented principles such as inheritance and polymorphism. I also demonstrated how to use transactions to manage operations on your persistent data and how to optimize database queries using FetchPlans and FetchGroups. Click here to watch “OpenAccess ORM Advanced Topics” on Telerik TV! If you need a more introductory guide before diving into these topics, don’t forget to check out...
    May 27, 2021 1 min read