Skip to content

Commit f7f6028

Browse files
committed
Merged PR 11270: Devkit renames
renames
1 parent 22c4a1c commit f7f6028

15 files changed

Lines changed: 60 additions & 62 deletions

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ bld/
3737

3838
# Visual Studio 2015/2017 cache/options directory
3939
.vs/
40-
!.vs
41-
.vs/*
42-
!.vs/BridgingIT.DevKit
43-
.vs/BridgingIT.DevKit/*
44-
!.vs/BridgingIT.DevKit/color.txt
45-
# Uncomment if you have tasks that create the project's static files in wwwroot
46-
#wwwroot/
4740

4841
# Visual Studio 2017 auto generated files
4942
Generated\ Files/

.vs/BridgingIT.DevKit/color.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
"commandCenter.border": "#e7e7e799"
2121
},
2222
"peacock.color": "#14389d",
23-
"dotnet.defaultSolution": "BridgingIT.DevKit.sln"
23+
"dotnet.defaultSolution": "bITdevKit.slnx"
2424
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "process",
88
"args": [
99
"build",
10-
"${workspaceFolder}/BridgingIT.DevKit.sln",
10+
"${workspaceFolder}/bITdevKit.slnx",
1111
"--nologo",
1212
"/property:GenerateFullPaths=true",
1313
"/consoleloggerparameters:NoSummary"

Directory.Build.props

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,33 @@
55
<!--package-->
66
<Authors>BridgingIT GmbH</Authors>
77
<Description>
8-
BridgingIT DevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs.
8+
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs.
99
</Description>
10-
<Copyright>Copyright 2024 (c) BridgingIT GmbH. All rights reserved.</Copyright>
11-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
10+
<Copyright>Copyright 2025 (c) BridgingIT GmbH. All rights reserved.</Copyright>
11+
<PackageTags>bridgingit;devkit;bitdevkit;dotnet;clean-architecture;solution;cqrs;ddd</PackageTags>
12+
<RepositoryUrl>https://github.com/BridgingIT-GmbH/bITdevKit</RepositoryUrl>
13+
<PackageProjectUrl>https://github.com/BridgingIT-GmbH/bITdevKit</PackageProjectUrl>
14+
<RepositoryType>git</RepositoryType>
15+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
16+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
17+
1218
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1319
<SourceRevisionId>build$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss"))</SourceRevisionId>
1420
<DebugType>embedded</DebugType>
1521
<EmbedAllSources>true</EmbedAllSources>
1622
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
1723
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
18-
<!--https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/caching-nuget?view=azure-devops#lock-dependencies-->
24+
<!--https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/caching-nuget?view=azure-devops#lock-dependencies-->
1925
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
2026
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
2127
<NoWarn>NU1903</NoWarn>
2228
</PropertyGroup>
2329

24-
<!--<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
30+
<!--<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
2531
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../../RELEASES.md"))</PackageReleaseNotes>
2632
</PropertyGroup>-->
2733

28-
<!--<ItemGroup>
34+
<!--<ItemGroup>
2935
<None Include="../../README.md" Pack="true" PackagePath="\"/>
3036
</ItemGroup>-->
3137

@@ -37,9 +43,9 @@
3743
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
3844
<WarningsAsErrors>true</WarningsAsErrors>
3945

40-
<!-- <CodeAnalysisRuleSet></CodeAnalysisRuleSet>-->
41-
<!--<UseSharedCompilation>true</UseSharedCompilation>-->
42-
<!--roslyn build speed-->
46+
<!-- <CodeAnalysisRuleSet></CodeAnalysisRuleSet>-->
47+
<!--<UseSharedCompilation>true</UseSharedCompilation>-->
48+
<!--roslyn build speed-->
4349
</PropertyGroup>
4450

4551
<ItemGroup>
@@ -53,7 +59,7 @@
5359
<None Remove="**\*.lock.json" Visible="false"/>
5460
</ItemGroup>
5561

56-
<!--<ItemGroup>
62+
<!--<ItemGroup>
5763
<Compile Include="..\..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
5864
</ItemGroup>-->
5965

@@ -68,7 +74,7 @@
6874
</ItemGroup>
6975

7076
<Target Name="CheckPackageVersion" BeforeTargets="Build"> <!-- prevent some unwanted package upgrades due to licensing -->
71-
<Error Condition="'%(PackageVersion.Identity)' == 'AutoMapper' AND '%(PackageVersion.Version)' != '[14.0.0]'" Text="Invalid package version for AutoMapper. Expected: 14.0.0." />
77+
<!-- <Error Condition="'%(PackageVersion.Identity)' == 'AutoMapper' AND '%(PackageVersion.Version)' != '[14.0.0]'" Text="Invalid package version for AutoMapper. Expected: 14.0.0." /> -->
7278
<Error Condition="'%(PackageVersion.Identity)' == 'MediatR' AND '%(PackageVersion.Version)' != '[12.5.0]'" Text="Invalid package version for MediatR. Expected: 12.5.0." />
7379
</Target>
7480

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 BridgingIT GmbH
3+
Copyright (c) 2025 BridgingIT GmbH
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Release 3.0.1 [25.04.24]
1+
## Release 9.0.0 [25.04.24]
22

33
- [N] Initial release
44

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@
55
}
66
],
77
"settings": {
8-
"dotnet.defaultSolution": "BridgingIT.DevKit.sln",
9-
"github.copilot.chat.codeGeneration.instructions": [
10-
{
11-
"file": ".github/.copilot-instructions.md"
12-
},
13-
{
14-
"file": "CODE-STYLE.md"
15-
}
16-
],
8+
"dotnet.defaultSolution": "bITdevKit.slnx",
179
"workbench.colorCustomizations": {
1810
"activityBar.activeBackground": "#1a48ca",
1911
"activityBar.activeBorder": "#e9567c",
@@ -34,6 +26,14 @@
3426
"titleBar.inactiveForeground": "#e7e7e799",
3527
"commandCenter.border": "#e7e7e799"
3628
},
37-
"peacock.color": "#14389d"
29+
"peacock.color": "#14389d",
30+
"github.copilot.chat.codeGeneration.instructions": [
31+
{
32+
"file": ".github/.copilot-instructions.md"
33+
},
34+
{
35+
"file": "CODE-STYLE.md"
36+
}
37+
],
3838
}
3939
}
File renamed without changes.

docs/features-domain-activeentity.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Overview
66

7-
The ActiveEntity feature in the bITDevKit reimagines the classic [Active Record pattern](https://en.wikipedia.org/wiki/Active_record_pattern), for .NET developers. This modern take embeds CRUD operations and queries directly into entity classes, providing a streamlined data access solution. Unlike its traditional form, it is persistence-neutral, relying on pluggable providers that can integrate with Entity Framework Core (EF Core), in-memory stores or custom data sources, configurable per entity. Entities inherit from `ActiveEntity<TEntity, TId>`, extending the `Entity<TId>` base class for ID handling, equality and transient checks, while employing the `Result` pattern for consistent operation outcomes (success/failure with messages and errors). Tailored for developers building CRUD-heavy or domain-rich applications, it complements complex query needs with repository patterns when necessary, aligning with the DevKit's commitment to modular, effective solutions.
7+
The ActiveEntity feature in the bITDevKit reimagines the classic [Active Record pattern](https://en.wikipedia.org/wiki/Active_record_pattern), for .NET developers. This modern take embeds CRUD operations and queries directly into entity classes, providing a streamlined data access solution. Unlike its traditional form, it is persistence-neutral, relying on pluggable providers that can integrate with Entity Framework Core (EF Core), in-memory stores or custom data sources, configurable per entity. Entities inherit from `ActiveEntity<TEntity, TId>`, extending the `Entity<TId>` base class for ID handling, equality and transient checks, while employing the `Result` pattern for consistent operation outcomes (success/failure with messages and errors). Tailored for developers building CRUD-heavy or domain-rich applications, it complements complex query needs with repository patterns when necessary, aligning with the bITdevKit commitment to modular, effective solutions.
88

99
## Challenges
1010

@@ -32,7 +32,7 @@ The [Active Record pattern is described by Martin Fowler](https://www.martinfowl
3232

3333
### Components
3434

35-
The feature centers on `ActiveEntity<TEntity, TId>`, which embeds persistence logic and delegates to an `IActiveEntityEntityProvider<TEntity, TId>` for data access. Behaviors, implementing `IActiveEntityEntityBehavior<T>`, intercept operations to manage concerns like logging or auditing, executed in registration order. The global service provider, configured via `ActiveEntityConfigurator`, resolves these components at runtime, ensuring flexibility and testability.
35+
The feature centers on `ActiveEntity<TEntity, TId>`, which embeds persistence logic and delegates to an `IActiveEntityEntityProvider<TEntity, TId>` for data access. Behaviors, implementing `IActiveEntityEntityBehavior<T>`, intercept operations to manage concerns like logging or auditing, executed in registration order. The global service provider, configured via `ActiveEntityConfigurator`, resolves these components at runtime, ensuring flexibility and testability.
3636
The **`ActiveEntityContext<TEntity, TId>`** is a lightweight object that bundles the `IActiveEntityEntityProvider` and its associated `IActiveEntityEntityBehavior` instances, ensuring that all components within a given operation share the same underlying DI scope and transactional context, simplifying complex scenarios.
3737

3838
```mermaid
@@ -114,7 +114,7 @@ classDiagram
114114
+AfterFindOneAsync(id, options, entity, success, ct) Task~Result~
115115
// ... other Before/After hooks for FindAll, Count, Exists, Project
116116
}
117-
117+
118118
class ActiveEntityContext~TEntity, TId~ {
119119
+IActiveEntityEntityProvider~TEntity, TId~ Provider
120120
+IReadOnlyCollection~IActiveEntityEntityBehavior~T~~ Behaviors
@@ -241,7 +241,7 @@ var customer = new Customer
241241
LastName = "Doe",
242242
Title = "Mr."
243243
};
244-
var insertResult = await customer.InsertAsync();
244+
var insertResult = await customer.InsertAsync();
245245

246246
if (insertResult.IsSuccess)
247247
{
@@ -257,7 +257,7 @@ var results = await Customer.InsertAsync(
257257
[
258258
new() { FirstName = "John", LastName = "Doe", Email = EmailAddressStub.Create("john.doe@example.com"), Title = "Mr." },
259259
new() { FirstName = "Jane", LastName = "Doe", Email = EmailAddressStub.Create("jane.doe@example.com"), Title = "Ms." }
260-
]);
260+
]);
261261

262262
foreach (var result in results)
263263
{
@@ -273,7 +273,7 @@ First, load the entity, modify it and then call `UpdateAsync`.
273273
```csharp
274274
var customer = (await Customer.FindOneAsync(customerId)).Value;
275275
customer.FirstName = "Janet";
276-
var updateResult = await customer.UpdateAsync();
276+
var updateResult = await customer.UpdateAsync();
277277

278278
if (updateResult.IsSuccess)
279279
{
@@ -292,7 +292,7 @@ var customer2 = (await Customer.FindOneAsync(customerId2)).Value;
292292
customer1.FirstName = "Janet";
293293
customer2.FirstName = "Johnu";
294294

295-
await Customer.UpdateAsync([customer1, customer2]);
295+
await Customer.UpdateAsync([customer1, customer2]);
296296
```
297297

298298
### Update existing entity properties directly
@@ -301,7 +301,7 @@ For an entity instance only specific properties are updated using a fluent synta
301301

302302
```csharp
303303
var customer = (await Customer.FindOneAsync(customerId)).Value;
304-
var updateResult = await customer.UpdateAsync(u => u
304+
var updateResult = await customer.UpdateAsync(u => u
305305
.Set(c => c.FirstName, "Janet") // constant assignment
306306
.Set(c => c.Visits, c => c.Visits + 1) // computed assignment
307307
.Set(c => c.Title, _ => "Archived")); // dynamic constant
@@ -337,7 +337,7 @@ First, load the entity and then call `DeleteAsync`.
337337

338338
```csharp
339339
var customer = (await Customer.FindOneAsync(customerId)).Value;
340-
var deleteResult = await customer.DeleteAsync();
340+
var deleteResult = await customer.DeleteAsync();
341341

342342
if (deleteResult.IsSuccess)
343343
{
@@ -353,7 +353,7 @@ First, load the entities and then call `DeleteAsync` with a collection.
353353
var customer1 = (await Customer.FindOneAsync(customerId1)).Value;
354354
var customer2 = (await Customer.FindOneAsync(customerId2)).Value;
355355

356-
await Customer.DeleteAsync([customer1, customer2]);
356+
await Customer.DeleteAsync([customer1, customer2]);
357357
```
358358

359359
### Delete multiple existing entities by ID
@@ -387,7 +387,7 @@ if (deleteResult.IsSuccess)
387387
Find an entity by its ID.
388388

389389
```csharp
390-
var findResult = await Customer.FindOneAsync(customerId);
390+
var findResult = await Customer.FindOneAsync(customerId);
391391
if (findResult.IsSuccess)
392392
{
393393
var customer = findResult.Value;
@@ -398,7 +398,7 @@ if (findResult.IsSuccess)
398398
### Find multiple entities (unfiltered)
399399

400400
```csharp
401-
var findAllResult = await Customer.FindAllAsync();
401+
var findAllResult = await Customer.FindAllAsync();
402402
if (findAllResult.IsSuccess)
403403
{
404404
var customers = findAllResult.Value;
@@ -412,7 +412,7 @@ if (findAllResult.IsSuccess)
412412
### Find multiple entities (filtered)
413413

414414
```csharp
415-
var findAllResult = await Customer.FindAllAsync(e => e.LastName == "Doe");
415+
var findAllResult = await Customer.FindAllAsync(e => e.LastName == "Doe");
416416
if (findAllResult.IsSuccess)
417417
{
418418
var customers = findAllResult.Value;
@@ -427,7 +427,7 @@ if (findAllResult.IsSuccess)
427427

428428
```csharp
429429
var options = new FindOptions<Customer> { Skip = 0, Take = 10 };
430-
var pagedResult = await Customer.FindAllPagedAsync(options);
430+
var pagedResult = await Customer.FindAllPagedAsync(options);
431431
if (pagedResult.IsSuccess)
432432
{
433433
var customers = pagedResult.Value.Items;
@@ -464,7 +464,7 @@ public static class CustomerService
464464
{
465465
// Example: custom logging behavior specific to this service's logic
466466
// You might need to adjust the behavior interface to accept additional arguments
467-
// await behavior.LogSomethingAsync(updatedCustomer, ct);
467+
// await behavior.LogSomethingAsync(updatedCustomer, ct);
468468
}
469469

470470
return Result.Success();
@@ -493,13 +493,13 @@ var customer = new Customer
493493
var transactionResult = await Customer.WithTransactionAsync(async ctx => // ctx contains provider and behaviors
494494
{
495495
// All CRUD operations within this block must use the provided 'ctx'
496-
var insertResult = await customer.InsertAsync(ctx);
496+
var insertResult = await customer.InsertAsync(ctx);
497497
if (insertResult.IsFailure) return Result.Failure(insertResult.Errors); // propagate failure, will trigger rollback
498498
499499
// Perform another operation in the same transaction
500500
var updatedCustomer = (await ctx.Provider.FindOneAsync(customer.Id)).Value;
501501
if (updatedCustomer == null) return Result.Failure("Customer not found in transaction.");
502-
502+
503503
updatedCustomer.Title = "Sir";
504504
var updateResult = await updatedCustomer.UpdateAsync(ctx); // use ctx to ensure it's part of the same transaction
505505
if (updateResult.IsFailure) return Result.Failure(updateResult.Errors); // propagate failure, will trigger rollback
@@ -900,7 +900,7 @@ public static class CustomerQueryExtensions
900900
{
901901
var thirtyDaysAgo = DateTimeOffset.UtcNow.AddDays(-30);
902902
var spec = new Specification<Customer>(c => c.Orders.Any(o => o.DateSubmitted >= thirtyDaysAgo));
903-
return Customer.FindAllAsync(spec, null, ct);
903+
return Customer.FindAllAsync(spec, null, ct);
904904
}
905905
}
906906
```
@@ -951,13 +951,13 @@ While powerful, callbacks should be used sparingly for logic that is truly intri
951951

952952
## Appendix A: Disclaimer
953953

954-
The ActiveEntity feature provides a modern, entity-embedded approach to data access, ideal for CRUD-heavy applications within the bITDevKit ecosystem. It is not a replacement for comprehensive ORM frameworks or repository patterns in scenarios requiring complex queries, high-performance batch operations or multi-database support. Entity configurations are standard EF Core configurations, defined in `OnModelCreating` using the fluent API, ensuring compatibility with existing EF Core workflows. For advanced use cases, consider integrating with repositories or using EF Core directly. This feature prioritizes simplicity and alignment with DevKit principles, allowing developers to choose the simplest tool that meets their needs.
954+
The ActiveEntity feature provides a modern, entity-embedded approach to data access, ideal for CRUD-heavy applications within the bITDevKit ecosystem. It is not a replacement for comprehensive ORM frameworks or repository patterns in scenarios requiring complex queries, high-performance batch operations or multi-database support. Entity configurations are standard EF Core configurations, defined in `OnModelCreating` using the fluent API, ensuring compatibility with existing EF Core workflows. For advanced use cases, consider integrating with repositories or using EF Core directly. This feature prioritizes simplicity and alignment with bITdevKit principles, allowing developers to choose the simplest tool that meets their needs.
955955

956956
## Appendix B: Comparison with Repository Pattern
957957

958958
### Overview
959959

960-
The Active Record (AR) pattern embeds data access and domain logic directly into entities, making them responsible for their own persistence. The Repository pattern, a common alternative in the bITDevKit, abstracts persistence behind a repository interface, treating entities as plain data objects and separating data access from domain logic. Both patterns are supported within the DevKit, with AR offering a modern twist through per-entity providers and behaviors, while Repository provides a traditional abstraction layer.
960+
The Active Record (AR) pattern embeds data access and domain logic directly into entities, making them responsible for their own persistence. The Repository pattern, a common alternative in the bITDevKit, abstracts persistence behind a repository interface, treating entities as plain data objects and separating data access from domain logic. Both patterns are supported within the bITdevKit, with AR offering a modern twist through per-entity providers and behaviors, while Repository provides a traditional abstraction layer.
961961

962962
### Characteristics of Each Pattern
963963

0 commit comments

Comments
 (0)