Telerik blogs
  • Productivity

    Using shared columns with Telerik OpenAccess ORM

    Telerik OpenAccess ORM always implemented relations between entities as reference properties (you can have properties on the both ends, or just on the one you decide) and this was the only supported way until now. Starting from Q3 2009 release we also started to support relations that are based not on reference properties, but rather on properties that expose the foreign keys for the entities. This pattern proved to be very useful for Linq To Sql, despite the fact that it is considered a ‘bad practice’ in the OOP domain. With the latest release of Telerik OpenAccess ORM we...
    May 27, 2021 4 min read
  • Productivity

    Dynamic Query with Telerik OpenAccess

    With the introduction of LINQ the concept of querying data became a first-class language construct in C# and Visual Basic.  LINQ enables to you write type-safe queries which are checked during compile-time. While type-safe queries are fine for certain situations, there might be cases where you want to construct a query on the fly, at runtime, based on certain selections made by the user. This is usually done using a string-based representation of the query. How can this be achieved via LINQ?   The LINQ team at Microsoft provides the Dynamic Query Library which extends the core LINQ API with capability to use...
    May 27, 2021 2 min read
  • Productivity

    LINQ Tip of the week: LINQ and Fetch Plans

    Today’s post will discuss one of the most interesting topics in LINQ to OpenAccess ORM and that is of course the proper use of the Fetch Plans functionality. If someone still wonders why Fetch Plans are so interesting when we talk about LINQ the answer is simple – they can boost the performance of your queries in times! When one decides to use a fetch plan he/she always defines one or more fetch groups that are going to be used as part of it. Those fetch groups are containing only the fields that we want to select when we...
    May 27, 2021 3 min read
  • Release

    Quick peek at the new OpenAccess class name generator

    A very common concern in Telerik OpenAccess ORM (as well as almost every other ORM product on the market) is how the names of the classes that represent your database tables are formed. Basically the mechanism for generating such names follows a simple pattern – the database table name is in plural form and the class name in the model is in single form. However, in the past OpenAccess covered a really small area of all the rules present for singularizing a given word. As of Q3 2009 this is not an issue anymore. We have implemented a simple, yet powerful...
    May 27, 2021 2 min read
  • Productivity

    How to map references and collections – Part 2

    In the first post we have described the ways to map a foreign key reference in the database to a reference, a collection or both in memory. This post continues the topic with the ways to map a join table. A join table is necessary if an m:n relationship has to be stored, but it also can contain the ordering inside a collection or the content of a dictionary. Let’s start with a simple join table in the database schema. Typically a join table contains two foreign key references, one to the left and one to the right table. 1) The natural way...
    May 27, 2021 4 min read