public ActionResult <ItemResponse <BusinessInfo_TypeStageIndustry> > GetBusinessInfo() { int iCode = 200; BaseResponse response = null; try { BusinessInfo_TypeStageIndustry BusinessInfo = _service.GetBusinessInfo(); if (BusinessInfo == null) { iCode = 404; response = new ErrorResponse("Application Resource not found"); } else { response = new ItemResponse <BusinessInfo_TypeStageIndustry>() { Item = BusinessInfo }; } } catch (Exception ex) { iCode = 500; base.Logger.LogError(ex.ToString()); response = new ErrorResponse($"Generic Error: {ex.Message}"); } return(StatusCode(iCode, response)); }
public BusinessInfo_TypeStageIndustry GetBusinessInfo() { BusinessInfo_TypeStageIndustry dropModel = new BusinessInfo_TypeStageIndustry(); _dataProvider.ExecuteCmd("dbo.BusinessProfiles_AdditionalInfo", inputParamMapper : delegate(SqlParameterCollection parms) { }, singleRecordMapper : delegate(IDataReader reader, short set) { switch (set) { case 0: BusinessStageId businessStagedModel = new BusinessStageId(); int index = 0; businessStagedModel.Id = reader.GetSafeInt32(index++); businessStagedModel.Name = reader.GetSafeString(index++); if (dropModel.BusinessStageId == null) { dropModel.BusinessStageId = new List <BusinessStageId>(); } if (dropModel.BusinessStageId != null) { BusinessStageId businessStages = new BusinessStageId(); } dropModel.BusinessStageId.Add(businessStagedModel); break; case 1: BusinessTypeId businessTypesModel = new BusinessTypeId(); int btindex = 0; businessTypesModel.Id = reader.GetSafeInt32(btindex++); businessTypesModel.Name = reader.GetSafeString(btindex++); if (dropModel.BusinessTypeId == null) { dropModel.BusinessTypeId = new List <BusinessTypeId>(); } if (dropModel.BusinessTypeId != null) { BusinessTypeId businessTypes = new BusinessTypeId(); } dropModel.BusinessTypeId.Add(businessTypesModel); break; case 2: IndustryTypeId industryTypesModel = new IndustryTypeId(); int itindex = 0; industryTypesModel.Id = reader.GetSafeInt32(itindex++); industryTypesModel.Name = reader.GetSafeString(itindex++); if (dropModel.IndustryTypeId == null) { dropModel.IndustryTypeId = new List <IndustryTypeId>(); } if (dropModel.IndustryTypeId != null) { IndustryTypeId industryTypes = new IndustryTypeId(); } dropModel.IndustryTypeId.Add(industryTypesModel); break; } }); return(dropModel); }