This is bad:
using System.Web.Mvc;
using FluffyNothing.Core.Objects;
namespace FluffyNothing.UserInterface.Controllers
{
public class AccountController : MvcController
{
public ActionResult Index()
{
Person person = GetFullIdentity();
if (person == null)
{
Response.Redirect("/");
}
return View(person);
}
}
}
This is better:
using System.Web.Mvc;
using FluffyNothing.Core.Objects;
namespace FluffyNothing.UserInterface.Controllers
{
public class AccountController : MvcController
{
public ActionResult Index()
{
Person person = GetFullIdentity();
if (person == null)
{
return RedirectToAction("Index", "Home");
}
return View(person);
}
}
}
No comments:
Post a Comment