DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.
$ dotnet add package DKNet.Svc.TransformationA flexible .NET library for template-based data transformation, designed for APIs, DDD, and EF Core scenarios. Supports custom token extraction, dynamic value resolution, and is fully configurable via dependency injection.
Add the NuGet package to your project:
dotnet add package DKNet.Svc.Transformation
Register the service in your DI container:
using Microsoft.Extensions.DependencyInjection;
using DKNet.Svc.Transformation;
var services = new ServiceCollection();
services.AddTransformerService(options =>
{
// Customize TransformOptions if needed
options.DisabledLocalCache = false;
});
Transform a template string:
var transformer = services.BuildServiceProvider().GetRequiredService<ITransformerService>();
string template = "Hello [Name]. Your {Email} had been [ApprovedStatus]";
var result = await transformer.TransformAsync(template, new { Name = "Duy", Email = "drunkcoding@outlook.net", ApprovedStatus = "Approved" });
// result: "Hello Duy. Your drunkcoding@outlook.net had been Approved"
Or use a custom token factory:
var result = await transformer.TransformAsync(template, async token =>
{
// Custom logic to resolve token value
return await GetValueForTokenAsync(token);
});
ITransformerService.TransformAsync(string templateString, params object[] parameters): Transform using provided data
objects.ITransformerService.TransformAsync(string templateString, Func<IToken, Task<object>> tokenFactory): Transform using
a custom token resolver.TransformOptions: Configure extractors, formatters, caching, and global parameters.TransformSetup.AddTransformerService(IServiceCollection, Action<TransformOptions>?): Register the service with DI.MIT © 2026 drunkcoding
https://github.com/baoduy/DKNet
Pull requests and issues are welcome!