public async Task <IActionResult> DeleteOrderStatusAsync(Int32 id) { var response = new SingleModelResponse <OrderStatusViewModel>() as ISingleModelResponse <OrderStatusViewModel>; try { var entity = await Task.Run(() => { return(_RESTfulAPI_Repository.DeleteOrderStatus(id)); }); response.Model = entity.ToViewModel(); response.Info = "The record was deleted successfully"; } catch (Exception ex) { response.DidError = true; response.ErrorMessage = ex.Message; } return(response.ToHttpResponse()); }