SplatDev.Umbraco.EntityFramework
2.0.5
dotnet add package SplatDev.Umbraco.EntityFramework --version 2.0.5
NuGet\Install-Package SplatDev.Umbraco.EntityFramework -Version 2.0.5
<PackageReference Include="SplatDev.Umbraco.EntityFramework" Version="2.0.5" />
<PackageVersion Include="SplatDev.Umbraco.EntityFramework" Version="2.0.5" />
<PackageReference Include="SplatDev.Umbraco.EntityFramework" />
paket add SplatDev.Umbraco.EntityFramework --version 2.0.5
#r "nuget: SplatDev.Umbraco.EntityFramework, 2.0.5"
#:package SplatDev.Umbraco.EntityFramework@2.0.5
#addin nuget:?package=SplatDev.Umbraco.EntityFramework&version=2.0.5
#tool nuget:?package=SplatDev.Umbraco.EntityFramework&version=2.0.5
SplatDev.Umbraco.EntityFramework
Entity Framework Core integration for Umbraco — provides the IRepository<TEntity> abstraction with DbContextRepository<TEntity>, second-level caching, pagination, raw SQL execution, and AsNoTracking reads. Designed for Umbraco applications that need EF Core data access alongside the Umbraco NPoco pipeline.
Compatibility
| .NET | Umbraco | EF Core | Package Version |
|---|---|---|---|
| 8.0 | 13 | 8.0.20 | 1.0.0 |
| 10.0 | 17 | 10.0.7 | 1.0.0 |
Installation
dotnet add package SplatDev.Umbraco.EntityFramework
Configuration
DI registration
using SplatDev.Umbraco.EntityFramework;
using Microsoft.EntityFrameworkCore;
// Register your DbContext
builder.Services.AddDbContext<MyDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
// Register the repository
builder.Services.AddScoped<IRepository<MyEntity>, DbContextRepository<MyEntity>>();
// Add second-level caching
builder.Services.AddEFCoreSecondLevelCache(options =>
{
options.UseMemoryCacheProvider();
options.CacheAllQueries(CacheExpirationMode.Absolute, TimeSpan.FromMinutes(30));
});
Usage
Basic CRUD
using SplatDev.Umbraco.EntityFramework;
public class ProductService
{
private readonly IRepository<Product> _repo;
public ProductService(IRepository<Product> repo) => _repo = repo;
public async Task<Product> GetByIdAsync(int id)
=> await _repo.GetByIdAsync(id);
public async Task<IEnumerable<Product>> GetAllAsync()
=> await _repo.GetAllAsync();
public async Task AddAsync(Product product)
=> await _repo.AddAsync(product);
public async Task UpdateAsync(Product product)
=> await _repo.UpdateAsync(product);
public async Task DeleteAsync(Product product)
=> await _repo.DeleteAsync(product);
}
Paginated queries
// Returns PagedResults<T> from SplatDev.Umbraco.Pagination
var paged = await _repo.GetPagedAsync(
page: 1,
pageSize: 20,
filter: p => p.IsActive,
orderBy: q => q.OrderBy(p => p.CreatedAt));
Raw SQL
// Execute raw SQL with parameterized queries
var products = await _repo.FromSqlRawAsync(
"SELECT * FROM Products WHERE Price > @0", 100);
// Execute non-query SQL
await _repo.ExecuteSqlRawAsync(
"UPDATE Products SET IsActive = 0 WHERE LastUpdated < @0",
DateTime.UtcNow.AddDays(-365));
Second-level caching
Queries decorated with the EFCoreSecondLevelCacheInterceptor are automatically cached:
// This result is cached for the configured duration
var categories = await _dbContext.Categories
.Cacheable()
.ToListAsync();
// Bypass cache when needed
var fresh = await _dbContext.Categories
.NotCacheable()
.ToListAsync();
AsNoTracking reads
// Read-only queries use AsNoTracking for performance
var readOnly = await _repo.GetAllNoTrackingAsync();
Features
IRepository<TEntity>interface for testable, injectable data accessDbContextRepository<TEntity>implementation with full CRUD operations- Second-level caching via
EFCoreSecondLevelCacheInterceptor(v5.3.2) - Built-in pagination via
SplatDev.Umbraco.PaginationreturningPagedResults<T> - Raw SQL support:
FromSqlRawAsyncandExecuteSqlRawAsync AsNoTrackingread-only queries for performance- Works alongside Umbraco's native NPoco pipeline
Dependencies
| Package | Purpose |
|---|---|
Microsoft.EntityFrameworkCore (v8.0.20 / v10.0.7) |
EF Core ORM |
EFCoreSecondLevelCacheInterceptor (v5.3.2) |
Second-level query caching |
Umbraco.Cms.Core |
Umbraco core APIs |
SplatDev.Umbraco.Pagination |
PagedResults<T> and pagination utilities |
Target Frameworks
net8.0— for Umbraco 13 applications (EF Core 8.0.20)net10.0— for Umbraco 17 applications (EF Core 10.0.7)
SplatDev.Umbraco.EntityFramework — part of the SplatDev.Umbraco.Plugins suite. Licensed under MIT. © SplatDev Ltda.
Changelog
2.0.5 — 2026-08-24
Removes a dashboard screenshot that showed an error toast. It was captured against a site where this plugin's API was unreachable, so it advertised a broken dashboard. No screenshot is better than a misleading one; a replacement will be taken against a working install.
2.0.4 — 2026-08-24
Package metadata only: the listing now carries an icon and search tags, and the project and repository links point at the organisation that actually hosts this code. No code changes.
2.0.2 — 2026-08-22
- This package's README now reaches NuGet. The publish workflow discovered packages by a list of name patterns, and this one matched none of them, so it was never built or pushed by CI — the version on NuGet was placed there by hand before the README was wired up, and no release could refresh it. Discovery is now by prefix, so the package ships whenever the repo is tagged.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- EFCoreSecondLevelCacheInterceptor (>= 5.3.2)
- EFCoreSecondLevelCacheInterceptor.MemoryCache (>= 5.3.2)
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- Microsoft.EntityFrameworkCore.DynamicLinq (>= 10.0.7)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.7)
- SplatDev.Umbraco.Pagination (>= 2.0.5)
- Umbraco.Cms.Api.Management (>= 17.3.4)
- Umbraco.Cms.Core (>= 17.3.4)
- Umbraco.Cms.Infrastructure (>= 17.3.4)
- Umbraco.Cms.Web.Common (>= 17.3.4)
- Umbraco.Cms.Web.Website (>= 17.3.4)
-
net8.0
- EFCoreSecondLevelCacheInterceptor (>= 5.3.2)
- EFCoreSecondLevelCacheInterceptor.MemoryCache (>= 5.3.2)
- Microsoft.EntityFrameworkCore (>= 8.0.20)
- Microsoft.EntityFrameworkCore.DynamicLinq (>= 8.6.8)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.20)
- SplatDev.Umbraco.Pagination (>= 2.0.5)
- Umbraco.Cms.Core (>= 13.12.0)
- Umbraco.Cms.Infrastructure (>= 13.12.0)
- Umbraco.Cms.Web.BackOffice (>= 13.12.0)
- Umbraco.Cms.Web.Common (>= 13.12.0)
- Umbraco.Cms.Web.Website (>= 13.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.5 | 88 | 8/24/2026 |