public ActionResult DeleteEnvironmentId(int?id)
        {
            if (id == null)
            {
                return(NoContent());
            }

            _service.Delete((int)id);

            return(Ok());
        }
예제 #2
0
        public IActionResult Delete(int id)
        {
            bool resultDelete = _service.Delete(id);

            if (!resultDelete)
            {
                throw new InvalidOperationException(string.Format(
                                                        "The environment with an ID of '{0}' could not be found. Make sure that environment exists.",
                                                        id));
            }

            return(Ok());
        }
예제 #3
0
 public IActionResult Delete(Guid id)
 {
     return(Ok(_service.Delete(id)));
 }
예제 #4
0
        public async Task <IActionResult> Delete(Guid environmentId)
        {
            await _environmentService.Delete(environmentId);

            return(Ok());
        }