Esempio n. 1
0
 public AuditLoggingService(
     IHttpContextAccessor httpContextAccessor,
     AdminAppContext adminAppDbContext)
 {
     _httpContextAccessor = httpContextAccessor;
     _adminAppDbContext   = adminAppDbContext;
 }
Esempio n. 2
0
 public SandboxController(
     AdminAppContext db,
     IHubContext <NotificationsHub, INotificationsHubClient> notificationsHubContext)
     : base(db)
 {
     _notificationsHubContext = notificationsHubContext;
 }
Esempio n. 3
0
 public UsersController(
     AdminAppContext db,
     UserManager <ApplicationUser> userManager,
     RoleManager <ApplicationRole> roleManager,
     IEmailSendingService emailService,
     IErrorLoggingService errorLogger) : base(db)
 {
     _userManager  = userManager;
     _roleManager  = roleManager;
     _emailService = emailService;
     _errorLogger  = errorLogger;
 }
Esempio n. 4
0
        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()));
        }
Esempio n. 5
0
 public NotificationService(AdminAppContext dbContext)
 {
     _dbContext = dbContext;
 }
Esempio n. 6
0
 protected ApiControllerBase(AdminAppContext db) => DbContext = db;
 public AuditLogController(AdminAppContext db)
     : base(db)
 {
 }
Esempio n. 8
0
 protected IdentityApiControllerBase(AdminAppContext db) => IdentityDbContext = db;
 public OnlineProductVersionsController(AdminAppContext db)
     : base(db)
 {
 }
Esempio n. 10
0
 public TemplatesController(AdminAppContext db, ITemplateService templateService)
     : base(db)
 {
     _templateService = templateService;
 }
Esempio n. 11
0
        /// <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());
        }
Esempio n. 12
0
 public AttorneysController(AdminAppContext db)
     : base(db)
 {
 }
Esempio n. 13
0
 protected CrudApiControllerBase(AdminAppContext db)
     : base(db)
 {
 }
 public SettingsController(AdminAppContext db) : base(db)
 {
 }
 public DesktopProductVersionsController(AdminAppContext db)
     : base(db)
 {
 }
Esempio n. 16
0
 public NotificationsController(AdminAppContext db) : base(db)
 {
 }