public List <Ld_Institution_Position> GetPositionByStatePro(int systemId, string companyId, string state) { try { int errCode = -1; string errMsg = "fail"; var result = LdCmsDbEntitiesContext.SP_Get_Institution_PositionByState(systemId, companyId, state, out errCode, out errMsg); if (errCode != 0) { throw new Exception(errMsg); } if (result == null) { return(null); } else { return(result.ToObject <List <Ld_Institution_Position> >()); } } catch (Exception ex) { throw new Exception(ex.Message); } }