Beispiel #1
0
        public SampleDbContext(DbContextOptions <SampleDbContext> options, IHttpContextAccessor httpContextAccessor)
            : base(options)
        {
            var auditController = new AuditTrailController <SampleDbContext, AuditTrailEntry>(this,
                                                                                              httpContextAccessor?.HttpContext?.User?.Identity?.Name);

            auditController.AddTypes(ActionFlags.Create, new[] { typeof(Product) });

            AddController(auditController);
        }
Beispiel #2
0
        public BusinessDbContextMock(DbContextOptions <BusinessDbContextMock> options)
            : base(options)
        {
            var auditController = new AuditTrailController <BusinessDbContextMock, AuditTrailMock>(this,
                                                                                                   "Admin");

            auditController.AddTypes(ActionFlags.Create, new[] { typeof(ProductMock) });

            AddController(auditController);
        }
Beispiel #3
0
 public FrmAuditTrail(AuditTrailController trailController)
 {
     InitializeComponent();
     TrailController = trailController;
 }