コード例 #1
0
 /// <summary>
 /// Return the current user.
 /// </summary>
 /// <returns></returns>
 internal User GetCurrentUser()
 {
     return(_adm.GetCurrentUser());
 }
コード例 #2
0
 /// <summary>
 /// Redirect to the login if the user is not logged in.
 /// </summary>
 /// <returns></returns>
 public ActionResult Index()
 {
     return(_adm.GetCurrentUser() == null?
            RedirectToAction(LocationString.Index, LocationString.Login) : (ActionResult)View());
 }