Exemple #1
0
        public async Task <ActionResult <PlantModel> > DeletePlantModel(long id)
        {
            PlantModel deletedPlant = await _plantService.DeletePlantAsync(id);

            if (deletedPlant == null)
            {
                return(NotFound());
            }

            return(deletedPlant);
        }
 public void DeletePlant(long id)
 {
     _service.DeletePlantAsync(id);
     Assert.IsNull(_service.GetPlant(id));
     Assert.IsFalse(_service.PlantExists(id));
 }