public AuditLoggingService( IHttpContextAccessor httpContextAccessor, AdminAppContext adminAppDbContext) { _httpContextAccessor = httpContextAccessor; _adminAppDbContext = adminAppDbContext; }
public SandboxController( AdminAppContext db, IHubContext <NotificationsHub, INotificationsHubClient> notificationsHubContext) : base(db) { _notificationsHubContext = notificationsHubContext; }
public UsersController( AdminAppContext db, UserManager <ApplicationUser> userManager, RoleManager <ApplicationRole> roleManager, IEmailSendingService emailService, IErrorLoggingService errorLogger) : base(db) { _userManager = userManager; _roleManager = roleManager; _emailService = emailService; _errorLogger = errorLogger; }
public static async ValueTask TryLogChangesAsync(this AdminAppContext dbContext) { //HttpContext httpContext = new HttpContextAccessor().HttpContext; //if (httpContext == null) //{ // return; //} //EntityChangeSerializer entityChangeSerializer = new(dbContext); //var auditLogger = httpContext.RequestServices.GetService<IAuditLoggingService>(); //await auditLogger.LogAsync(entityChangeSerializer.GetChangesAsJson(new StringEnumConverter())); }
public NotificationService(AdminAppContext dbContext) { _dbContext = dbContext; }
protected ApiControllerBase(AdminAppContext db) => DbContext = db;
public AuditLogController(AdminAppContext db) : base(db) { }
protected IdentityApiControllerBase(AdminAppContext db) => IdentityDbContext = db;
public OnlineProductVersionsController(AdminAppContext db) : base(db) { }
public TemplatesController(AdminAppContext db, ITemplateService templateService) : base(db) { _templateService = templateService; }
/// <summary> /// Persists the changes to the database and creates an audit log entry /// </summary> /// <param name="dbContext"></param> /// <returns></returns> public async static Task <int> SaveChangesWithAuditAsync(this AdminAppContext dbContext) { await TryLogChangesAsync(dbContext); return(await dbContext.SaveChangesAsync()); }
public AttorneysController(AdminAppContext db) : base(db) { }
protected CrudApiControllerBase(AdminAppContext db) : base(db) { }
public SettingsController(AdminAppContext db) : base(db) { }
public DesktopProductVersionsController(AdminAppContext db) : base(db) { }
public NotificationsController(AdminAppContext db) : base(db) { }