public ActionResult Delete(string id)
{
var school = _schoolRepository.GetNullableById(id);
if (school == null) return RedirectToAction("Index");
//Can't delete school if any units are assocaited with it
if (_unitRepository.Queryable.Any(x => x.School.Id == id))
{
Message = string.Format("Can't remove {0} ({1}) because there are units associated with it", school.ShortDescription, school.Id);
return RedirectToAction("Index");
}
return View(school);
}