protected BaseApiController(WutCache cache, WutNuContext models) { WebContextBase = new HttpContextWrapper(HttpContext.Current); Wutcontext = models; Wutcache = cache; var uid = WebContextBase.User.Identity; if (uid.IsAuthenticated) { UserId = uid.GetClaim <int>(CustomClaimTypes.UserId); OwnerOID = uid.GetClaim(CustomClaimTypes.ObjectIdentifier); UserEmail = uid.GetClaim(ClaimTypes.Email); } }
/// <summary> /// Initializes a new instance of the <see cref="BaseBusinessLayer"/> class. /// </summary> /// <param name="httpContext">The HTTP context.</param> public BaseBusinessLayer(HttpContextBase httpContext, WutNuContext context, WutCache cache) { io = context; htxBase = httpContext; //io.Configuration.ProxyCreationEnabled = false; //io.Configuration.AutoDetectChangesEnabled = false; io.Configuration.LazyLoadingEnabled = true; Wutcache = cache; //Wutcache = httpContext.GetOwinContext().Get<WutCache>("WutCache"); var ident = httpContext.User.Identity; if (ident.IsAuthenticated) { UserIO = ident.GetClaim(CustomClaimTypes.ObjectIdentifier); } }
protected BaseController(WutCache cache, WutNuContext models) { try { Wutcontext = models; Wutcache = cache; var uid = System.Web.HttpContext.Current.User.Identity; if (uid.IsAuthenticated) { UserId = uid.GetClaim <int>(CustomClaimTypes.UserId); OwnerOID = uid.GetClaim(CustomClaimTypes.ObjectIdentifier); UserEmail = uid.GetClaim(ClaimTypes.Email); } } catch (System.Exception ex) { Logging.WriteDebugInfoToErrorLog(ex.Message, ex); throw; } }
public ErrorLogController(WutCache cache, WutNuContext models) : base(cache, models) { _err = new ErrorItemBL(WebContextBase, Wutcontext); }
public ListController(WutCache cache, WutNuContext models) : base(cache, models) { }
public ReportsController(WutCache cache, WutNuContext models) : base(cache, models) { }
public FileController(WutCache cache, WutNuContext models) : base(cache, models) { containerName = OwnerOID; }
public UpdateErrorController(WutCache cache, WutNuContext models) : base(cache, models) { }
public ErrorLogController(WutCache cache, WutNuContext models) : base(cache, models) { }
public ProfileController(WutCache cache, WutNuContext models) : base(cache, models) { }
public HealthcheckController(WutCache cache, WutNuContext models) { _context = models; _cache = cache; }
public ReportController(WutCache cache, WutNuContext context) : base(cache, context) { _repo = new ReportRepo(context); }
public ProfileController(WutCache cache, WutNuContext models) : base(cache, models) { _repo = new UserRepo(models); }