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

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

            return(deletedPlant);
        }
コード例 #2
0
 public void DeletePlant(long id)
 {
     _service.DeletePlantAsync(id);
     Assert.IsNull(_service.GetPlant(id));
     Assert.IsFalse(_service.PlantExists(id));
 }