public ActionResult DeletePlant([FromRoute] Guid plantId) { var plantFromRepo = _experimentRepository.GetPlant(plantId); if (plantFromRepo == null) { return(NotFound()); } _experimentRepository.DeletePlant(plantFromRepo); _experimentRepository.Save(); return(NoContent()); }