The LLBLGen Pro Runtime Framework

Fast, fully featured, modern O/R mapper

Modern

.NET Framework and .NET Standard 2.0+ support

The runtime framework supports both .NET Framework (.NET 4.5.x+) and .NET Standard 2.0+ (for usage with e.g. .NET 6.x, .NET 7.x), with the same rich feature set. This gives you a wide spectrum of modern target operating systems and platforms to run your application on, without compromises. Migrating your application from .NET Framework to .NET 6+ is therefore easy and painless.
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

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 C#/VB.NET async/await statements to build truly asynchronous applications.
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 or higher / Express / CE Desktop / SQL Azure
  • MS Access 2000 or higher
  • Oracle 9i or higher
  • PostgreSQL 7.4+ or higher
  • Firebird 1.x or higher
  • IBM DB2 7.x or higher (not on AS/400 / iSeries)
  • MySQL 4.x or higher

Supported .NET versions

.NET 6.x, .NET 7.x, .NET Framework 4.5.2 or higher, .NET Standard 2.0, .NET Standard 2.1.

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