public IHttpActionResult GetAllTons() { WebResponseContentModel <List <TonsModel> > tmpUser = new WebResponseContentModel <List <TonsModel> >(); Del <List <TonsModel> > responseStatusHandler = ProcessContentModel; try { tmpUser.Content = tenderRepo.GetAllTons(); responseStatusHandler(tmpUser); } catch (Exception ex) { responseStatusHandler(tmpUser, ex); return(Json(tmpUser)); } return(Json(tmpUser)); }