public GetGeneralResponse <IEnumerable <SupportView> > GetSupports() { GetGeneralResponse <IEnumerable <SupportView> > response = new GetGeneralResponse <IEnumerable <SupportView> >(); try { IEnumerable <Support> supports = _supportRepository.FindAll(); response.data = supports.ConvertToSupportViews(); response.totalCount = supports.Count(); } catch (Exception ex) { response.ErrorMessages.Add(ex.Message); if (ex.InnerException != null) { response.ErrorMessages.Add(ex.InnerException.Message); } } return(response); }