Services are DKNet’s pluggable, provider-agnostic adapters: application code depends on a small interface
(IBlobService, IPdfGenerator, ITransformerService, the various encryption/hashing interfaces), and a concrete
package supplies the implementation. Swapping an implementation — a different blob provider, a different
encryption algorithm — is a DI change, not a rewrite of business logic. See
Onion Architecture for how this keeps infrastructure out of the domain and
application layers.
One abstraction, three providers — depend on IBlobService from Abstractions and register whichever provider
package matches your storage backend.
IBlobService contract, shared
models, and validation options every provider implements.DKNet.EfCore.Encryption, which encrypts EF Core
columns transparently — the page explains which one to reach for.)| Need | Package |
|---|---|
| Store/retrieve files without coupling to a specific cloud | BlobStorage.Abstractions + one provider |
| Encrypt/hash a value at the point you call it | Svc.Encryption |
| Encrypt an EF Core column transparently | EfCore.Encryption (not covered here) |
| Turn Markdown/HTML into a PDF | Svc.PdfGenerators |
| Fill a text template from an object | Svc.Transformation |