-
Notifications
You must be signed in to change notification settings - Fork 3
Documentation (WIP)
Check out the Documentation Website (WIP)!
It is auto-generated from all the XML document comments in the code base, and I plan on adding other things to it as well.
Contracts for services that can be used interact with the persistence layer in your application
dotnet add package EntityDb.Abstractions
At this time, I don't have any comments on how you should use this package. It is a dependency of every other package, and contains almost no testable code (the only exceptions being a handful of methods on value objects)
Implementations for some services which do not necessarily need to be implemented by every single application in their entirety. Additional contracts are introduced to allow for certain behaviors to work generically. The rest of the packages are build with varying degrees of dependency on this package.
dotnet add package EntityDb.Common
Implement these interfaces:
Commands are the things you can do in your system.
Entities are the states that describe your system. Any business logic you have depends on the state of these objects
These are the objects you nee
HttpContext implementations for agents
dotnet add package EntityDb.Mvc
In your ConfigureServices
method (in either Program.cs or Startup.cs), call the following extension methods on IServiceCollection serviceCollection
// This might be redundant, if your application has `IHttpContextAccessor` as a registered service.
serviceCollection.AddHttpContextAccessor();
// You can configure multiple options - they all need to be named, though
serviceCollection.Configure<HttpContextAgentSignatureOptions>("Default", (options) =>
{
options.RedactedHeaders = new[] { "Cookie", "Authorization" };
options.RedactedValue = "*REDACTED*";
});
// This registers the implementation of IAgentAccessor
serviceCollection.AddHttpContextAgentAccessor();
MongoDb repository implementations for transactions
dotnet add package EntityDb.MongoDb
Postgres implementations for transactions
dotnet add package EntityDb.Npgsql
In-memory repository implementations for snapshots
dotnet add package EntityDb.InMemory
A tool that allows you to provision certain resources for database providers, such as roles, tables/collections, and username/passwords
dotnet tool install EntityDb.Provisioner
Pretend these do not exist. If I have coded things correctly, all of the code in these packages is internal and not accessible to your application, only to the packages listed above. I just have not figured out how to make the dependent packages bundle the DLLs they need instead of depending on these packages.
NOTE - Right now links go to a directory in the repository. This is a placeholder for if/when a Wiki page is added that goes into more detail about that directory.