public ActionResult Index() { try { _currentUser = new DbService().User; } catch (UserNotLoggedException) { System.Diagnostics.Debug.WriteLine("O Kurwa!"); Redirect("Account/Login"); } return(View(_currentUser)); }
public DbService(int userId) { User = GetUserById(userId); }
public DbService() { User = GetCurrentUser(); }