ASP.NET MVC null ViewResult
- by David Neale
How should one deal with an MVC controller returning a null ViewResult?
As an example I am creating a simple edit view:
public ActionResult Edit(int id)
{
var person = (from p in context.SWLiftShare_Persons
where p.id == id
select p).SingleOrDefault();
if (person != null)
…