Return View of a model or an HttpStatusCode
public ActionResult Details(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
OrderNote orderNote = mymethodtoretriverecord(id);
if (orderNote == null)
{
return HttpNotFound();
}
return View(orderNote);
}
Comments