Nancy.Response DeleteItem(string id) { try { ItemMapper itm_mpr = new ItemMapper(); ItemModel item = itm_mpr.GetById(id); if (item == null) { return(ErrorBuilder.ErrorResponse(this.Request.Url.ToString(), "GET", HttpStatusCode.NotFound, String.Format("An Item with Id = {0} does not exist", id))); } itm_mpr.delete(item); return(HttpStatusCode.OK); } catch (Exception e) { return(HandleException(e, String.Format("\nItemModule.Delete({0})", id))); } }