Telerik blogs

Latest

  • Productivity Reporting

    Medium Trust Support for Telerik Reporting

    A lot of people requested this, so we've put all our efforts into it and even managed to finish it in time for the Q2 service pack that shipped just this Friday - download it if you haven't yet. Please hold on your dismay - deploying an ASP.NET application containing Telerik Reporting on a web host that requires Medium Trust permission level is now a reality. For those of you, who do not know what that means - you probably do not need it, but if you would like to know, check the following "ASP.NET Trust Levels and Policy Files" and "Use Medium Trust in ASP.NET 2.0" documents in MSDN. There...
    May 27, 2021 2 min read
  • Productivity

    How Does the First Level Cache of Telerik OpenAccess ORM Work

    Telerik OpenAccess ORM has two levels of caching. The upper one is a local cache specific for each IObjectScope instance and it is the focus of this post. The lower cache, the second level cache is common for all IObjectScope objects and is used to hold unchanged database content in memory. The values for various fields of the user objects (like a Person instance) are duplicated in the L2 cache. It is populated during read access and gives fast retrieval of commonly used objects. Additionally, the cache can contain complete query results. Note that the L2 cache is not enabled by...
    May 27, 2021 3 min read
  • Productivity

    Retrieving object from the database using only its key

    When you try to persist an object Telerik OpenAccess ORM will require an “identity” so that the object is uniquely identified for storage and retrieval. Usually this id is mapped directly to a primary key column or columns (composite key) in the database and identifies also the in-memory representation of the object. Using this identifier, you can directly retrieve the object from the database. Supposing that we have table with an int primary key (for example the Category table from the Northwind database) and we want to retrieve the Category with id that is equal to 6 directly. We would need...
    May 27, 2021 3 min read
  • Productivity

    LINQ To M Refresh

    If case you did not know, Telerik released LINQ to M a few weeks ago, enabling you to use a LINQ style interface with M values of data. Mehfuz and I have written blog posts where you can see how to use the basics.  There have been tremendous amounts of downloads and we have gotten tons of feedback. (Thanks, keep it coming!) One thing that stood out is that when you are building M values a lot of time you will have a named instance of your M code like this: 1: //People is the named "M" instance 2: People{ 3: {Id=1,Name="Stephen Forte",Age=37}, 4: {Id=2,Name="Mehfuz Hossain",Age=29}, 5: {Id=3,Name="Vassil Terziev",Age=31}, 6: {Id=4,Name="Nadia Terziev",Age=27}, 7: {Id=5,Name="Chris Sells",Age=37}, 8: {Id=6,Name="Todd Anglin",Age=27}, 9: {Id=7,Name="Joel Semeniuk",Age=37}, 10: {Id=8,Name="Richard...
    May 27, 2021 2 min read
  • Productivity

    LINQ Tip of the week: A quick peek behind the curtains

    In our previous post in this series we had a look at how to optimize query execution with the help of parameterized queries. Today we will briefly look at what actually happens ‘behind the curtains’ when a LINQ query is executed and you get back  the results.   As you already know LINQ can be used to query various data sources like in-memory objects, XML or databases,which is of particular interest to us. Consider the following example where we query for all employees who are born in the same month as today i.e.  in the month of July.   var employees = from e in scope.Extent<Employee>()                           where e.BirthDate.Month == DateTime.Now.Month                           select e;   As you can...
    May 27, 2021 2 min read