The LLBLGen Pro Runtime Framework

Fast, fully featured, modern O/R mapper

Modern

Full async API

The runtime framework offers a full Async API, usable in Linq, QuerySpec and the Low-Level API for retrieval of data and object persistence, using the .NET 4.5 C#/VB.NET async/await statements to build truly asynchronous applications.
Read more

Transparent Transient Error Recovery

The runtime framework offers the ability to recover from transient errors occuring during database activity, using set-and-forget recovery strategies, which you can extend to your own liking. This is especially useful in cloud environments like Azure.
Read more

Multi-tenancy support

Support multiple database instances (catalogs, schemas) in one application, and switch between them dynamically at runtime. This way you can have one application, serving all your customers with e.g. one database / schema per customer without any effort.
Read more

Allowed Action Combinations

Specify which actions are allowed on an entity instance: any combination of Create/Read/Update/Delete. Action Combinations make it easy to define e.g. entities which can only be created or read but never updated nor deleted. The action combinations are defined at the mapping level and checked inside the runtime, and are additional to the authorization framework.
Read more

public async Task<list<OrderEntity>> GetOrdersOfCustomersFromCountryAsync(string country)
{
    using(var adapter = new DataAccessAdapter())
    {
        // use azure transient error recovery strategy using max of 5 retries, with a maximum delay 
        // of 10 seconds between tries, using 2 seconds as base interval and a linear delay increase.
        var transientStrategy = new SqlAzureRecoveryStrategy(5, new RecoveryDelay(
                                                            new TimeSpan(0, 0, 10), 2, 
                                                            RecoveryStrategyDelayType.Linear));
        adapter.ActiveRecoveryStrategy = transientStrategy;
        var metaData = new LinqMetaData(adapter);
        var q = from o in metaData.Order
                where o.Customer.Country == country
                orderby o.OrderId ascending
                select o;
        return await q.ToListAsync();
    }
}

Example of an async method using a transient error recovery strategy in a linq query.

Reliable

Rock solid since 2003

The LLBLGen Pro Runtime Framework was first released in 2003 and has been refined and extended to the rock solid foundation it is today. In those years it has proven to be a reliable, feature complete choice for data-access in .NET applications.

Auditing support

The runtime framework has transparent and in-transaction auditing support for tracking and logging actions taken on entities. Audit information can be exported to any output you like or transparently be saved as entities inside the same transaction.
Read more

Authorization support

The runtime framework has fine-grained authorization supported through authorizers you can write yourself using easy to extend base classes. Authorization can be used for example to avoid having some users see some data or do certain actions to entity instances.
Read more

Validation support

The runtime framework supports deep, fine-grained validation through validator objects you write using simple extendable base classes. Additionally, it supports built-in, extensible, value validation based on the entity mappings.
Read more

[DependencyInjectionInfo(typeof(EmployeeEntity), "AuthorizerToUse", 
                         ContextType = DependencyInjectionContextType.Singleton)]
public class EmployeeAuthorizer : AuthorizerBase
{
    public override bool CanGetFieldValue(IEntityCore entity, int fieldIndex)
    {
        var toReturn = ((EntityType)entity.LLBLGenProEntityTypeValue == EntityType.EmployeeEntity);
        IIdentity currentIdentity = Thread.CurrentPrincipal.Identity;
        if((EmployeeFieldIndex)fieldIndex == EmployeeFieldIndex.NationalIdnumber)
        {
            // John Doe can't see NationalID number values.
            toReturn &= (currentIdentity.Name != "John Doe");
        }
        return toReturn;
    }
    
    public override bool CanSetFieldValue(IEntityCore entity, int fieldIndex)
    {
        bool toReturn = ((EntityType)entity.LLBLGenProEntityTypeValue == EntityType.EmployeeEntity);
        IIdentity currentIdentity = Thread.CurrentPrincipal.Identity;
        if((EmployeeFieldIndex)fieldIndex == EmployeeFieldIndex.SalariedFlag)
        {
            // Joyce Rockefeller is the only one who can set SalariedFlag
            toReturn &= (currentIdentity.Name == "Joyce Rockefeller");
        }
        return toReturn;
    }
}

Example of an Authorizer with a Dependency Injection setup attribute, which in this example authorizes on field read/write.

High performance and flexibility

Resultset caching support

Specify a query result cache directive to tell the runtime to cache the results for that particular query for a given amount of time. The caching system is built around a simple interface, making it easy to extend it with own cache providers for cache systems like Redis.
Read more

Highly tuned

The runtime is highly tuned to show the highest performance with the richest API. We don't cut corners like others do to get higher throughput; the LLBLGen Pro runtime framework keeps performing whatever you throw at it. See for yourself.

Unit of Work support

You can group multiple database actions you want to take on various entities, like delete and insert/update, into a Unit of Work object, which you then can use to execute all work inside that Unit of Work as a single transaction.
Read more

Plain SQL API

The LLBLGen Pro Runtime Framework lets you execute plain SQL statements using parameters directly onto the database, including fetching resultsets and projecting the resultsets to POCO classes. With this API you can also take advantage of features like automatic paging query generation and resultset caching. This API is very fast too: it is faster than most microORMs.
Read more

public async Task<EntityCollection<CustomerEntity>> GetAllCustomersAndRelated_Async(string country)
{
    var toReturn = new EntityCollection<CustomerEntity>();
    using(var adapter = new DataAccessAdapter())
    {
        // if parent has more than 200 elements, in-line child filter as IN (value, value...)
        adapter.ParameterisedPrefetchPathThreshold = 200;
        var qf = new QueryFactory();
        var q = qf.Customer
                        .Where(CustomerFields.Country == country)
                        .WithPath(CustomerEntity.PrefetchPathOrders
                                            .WithSubPath(OrderEntity.PrefetchPathEmployee),
                                    CustomerEntity.PrefetchPathEmployeeCollectionViaOrder)
                        .CacheResultset(10);
        await adapter.FetchQueryAsync(q, toReturn);
    }
    return toReturn;
}

Example of a QuerySpec query using resultset caching, eager loading and eager loading auto-tuning setting

At a glance

Supported Databases

The LLBLGen Pro Designer supports the following relational databases for LLBLGen Pro Runtime Framework:

  • SQL Server 2000 - 2016 / Express / CE Desktop / SQL Azure
  • MS Access 2000 - 2016
  • Oracle 9i/10g/11g/12c
  • PostgreSQL 7.4+/8.x/9.x
  • Firebird 1.x/2.x
  • IBM DB2 7.x-11.x (not on AS/400 / iSeries)
  • MySQL 4.x/5.x

Supported .NET versions

.NET 3.5, .NET 4.0, .NET 4.5, .NET 4.5.x, .NET 4.6.x, .NET 4.7.x

Supported .NET output languages

Code is generated in C# or VB.NET. Generated code can be used from any .NET language.

Why wait?

Become more productive today.

Buy now    Download Trial   
Download Lite