In your projects developed with EntityFramework, it keeps track of all the changes that take place in your database and records them wherever you want.
It is very simple to use and ready in just 4 steps.
- Install EntityGuardian NuGet package from here.
PM> Install-Package EntityGuardian
- Add the
EntityGuardianInterceptor
interceptor.
builder.Services.AddDbContext<Your_DbContext>(
(serviceProvider, options) =>
options.AddInterceptors(
serviceProvider.GetRequiredService<EntityGuardianInterceptor>()));
- Add and configure builder.Services.AddEntityGuardian().
builder.Services.AddEntityGuardian(
"your_sql_server_connection_string",
option =>
{
option.StorageType = StorageType.SqlServer;
option.DataSynchronizationTimeout = 30;
option.ClearDataOnStartup = false;
option.RoutePrefix = "entity-guardian";
option.EntityGuardianSchemaName = "EntityGuardian";
});
StorageType
The type of database where changes will be saved. Only Sql Server is supported for now.
DataSynchronizationTimeout
The time in seconds that changes will be reflected. Default 30 seconds.
ClearDataOnStartup
Determines the deletion of previous records since the project is Startup.
RoutePrefix
Access link prefix for the dashboard. Default "entity-guardian".
EntityGuardianSchemaName
Schema of tables belonging to EntityGuardian in the database. Default "EntityGuardian".
- Add app.UseEntityGuardian()
app.UseEntityGuardian();
Stand up your project, go to /entity-guardian
and keep track of all changes.
Future planned developments.
- Login page.
- Multiple database support.
Give a star ⭐, fork and stay tuned.