public IHttpActionResult Delete(int id) { widgetManager = new WidgetManager(); if (widgetManager.GetWidget(id) == null) { return(NotFound()); } widgetManager.RemoveWidget(id); return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult Delete(int id) { widgetManager = new WidgetManager(); if (widgetManager.GetWidget(id) == null) { return(NotFound()); } widgetManager.RemoveWidget(id); return(StatusCode(HttpStatusCode.NoContent)); }