Skip to content

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.

License

Notifications You must be signed in to change notification settings

byerlikaya/EntityGuardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entity Guardian

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.

GitHub Workflow Status (with event) EntityGuardian Nuget EntityGuardian Nuget

It is very simple to use and ready in just 4 steps.

  1. Install EntityGuardian NuGet package from here.
PM> Install-Package EntityGuardian
  1. Add the EntityGuardianInterceptor interceptor.
builder.Services.AddDbContext<Your_DbContext>(
    (serviceProvider, options) =>
        options.AddInterceptors(
            serviceProvider.GetRequiredService<EntityGuardianInterceptor>()));
  1. 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".

  1. Add app.UseEntityGuardian()
app.UseEntityGuardian();

Stand up your project, go to /entity-guardian and keep track of all changes.

Transactions

1

Transaction Details

2

Transaction Detail

3

Future planned developments.

  • Login page.
  • Multiple database support.

Give a star ⭐, fork and stay tuned.