protected override IAsyncResult BeginExecute(RequestContext requestContext, AsyncCallback callback, object state) { if (requestContext.HttpContext.User.Identity.IsAuthenticated) { var username = requestContext.HttpContext.User.Identity.Name; var user = this.Data.Users.All().FirstOrDefault(u => u.UserName == username); this.UserProfile = user; } return base.BeginExecute(requestContext, callback, state); }
public NewsController(IOuchernikData data, User userProfile) : base(data, userProfile) { }
protected BaseController(IOuchernikData data, User userProfile) : this(data) { this.UserProfile = userProfile; }
public ResourcesController(IOuchernikData data, User userProfile) : base(data, userProfile) { }