affolterNET.CRM
0.1.5
dotnet add package affolterNET.CRM --version 0.1.5
NuGet\Install-Package affolterNET.CRM -Version 0.1.5
<PackageReference Include="affolterNET.CRM" Version="0.1.5" />
<PackageVersion Include="affolterNET.CRM" Version="0.1.5" />
<PackageReference Include="affolterNET.CRM" />
paket add affolterNET.CRM --version 0.1.5
#r "nuget: affolterNET.CRM, 0.1.5"
#:package affolterNET.CRM@0.1.5
#addin nuget:?package=affolterNET.CRM&version=0.1.5
#tool nuget:?package=affolterNET.CRM&version=0.1.5
affolterNET.CRM
A generic person / organization / role CRM data layer on Azure Table Storage, split into two NuGet packages:
| Package | Contents |
|---|---|
| affolterNET.AzureStorage | Generic Table-Storage primitives with zero CRM knowledge: TableRepositoryBase<T>, KeySanitizer, StorageClientFactory (connection string → user-assigned managed identity → DefaultAzureCredential), registry-driven StorageInitializer, IStorageEntity, ITrackedEntity + field-level manual-override protection. Usable by any project that stores entities in Azure Table Storage. |
| affolterNET.CRM | The party-role model on top of affolterNET.AzureStorage: PersonEntity, OrganizationEntity, RoleEntity, AddressEntity, the firstname→sex matchlist with SalutationResolver (Anrede derivation), period-aware role resolution with nearest-period fallback, and Ensure* services that respect manual edits. |
Model
- persons — one row per real human (single partition). Deterministic
PersonIdviaPersonEntity.BuildPersonKey(lastName, firstName, birthdate?); birthdate distinguishes same-named people and unifies the same person across contexts.SexandSalutationare derived from the matchlist at creation only and never re-derived. - organizations — partitioned by consumer-registered
OrgType(e.g.club,district,organization), with parent references for hierarchies. - roles — person ⇄ organization links with a
RoleDefinition(roleType, hasPeriod, exclusivePerOrg). Holders of a role type+period are one partition; members of one org are a RowKey prefix range. Past-period rows are never touched by syncs. - addresses — per owner (person or org) and purpose, with a
CareOfline. - firstnamesex — the firstname→sex matchlist. The library ships the mechanism and an
idempotent
SeedAsync; the data (e.g. an open-data firstname list) is consumer-supplied.
Provenance & manual-override protection
Every tracked entity carries Source (sync/manual/import), SyncOrigin, CreatedAt,
UpdatedAt, LastSeenAt, a soft-delete Deleted flag (syncs never physically delete)
and ManualFields — a list of manually edited properties that no sync write will ever
overwrite (SetUnlessManual). Manual role rows are never replaced or removed by syncs.
Usage
var crm = services.AddCrmServices(configuration, o =>
{
o.StorageSectionName = "affolterNET:MyApp:Storage"; // reuse existing config/env vars
o.AddOrganizationType("club").AddOrganizationType("district");
o.AddRole("member", hasPeriod: false, exclusivePerOrg: false);
o.AddRole("president", hasPeriod: true, exclusivePerOrg: true);
o.UsePersonType<MyPersonEntity>(); // consumer subclass with extra columns
o.AddTable<MyDomainEntity>(); // consumer-owned tables, created at startup
});
Entities are extended by inheritance (MyPersonEntity : PersonEntity) — Table Storage
stores the extra properties in the same table; all repositories/services are generic over
the concrete type, so no write path can drop consumer columns.
Note: Azure Table Storage has no decimal EDM type — consumer entities with money
amounts use double.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 was computed. 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. |
-
net9.0
- affolterNET.AzureStorage (>= 0.1.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://github.com/affolterNET/affolterNET.CRM/commits for recent changes.