我想在foreach循环中执行的Array中获取查询结果,我有自定义类,但是每当我尝试将其保存在变量中时,它都会显示错误:无法将genriccustom类转换为我的自定义类var userName = HttpContext.Current.User.Identity.Name; var result = entities.USERS.SingleOrDefault(x => x.USER_NAME.Equals(userName, StringComparison.OrdinalIgnoreCase)); var Result = (from p in entities.Apps where p.USERID == result.USERID select p).ToList(); var children = new List<InsuredSummary>(); foreach (var queryresult in Result) { var query_result = (from b in entities.USERS // join c in entities.APP_INFORMATION on Result.INSURED_APPLICATION_ID equals c.INSURED_APPLICATION_ID // join d in entities.APP_INFO_VEHICLE on Result.INSURED_APPLICATION_ID equals d.INSURED_APPLICATION_ID // join e in entities.APP_INFO_VEHICLE_OPTIONS_ACCESSORIES on Result.INSURED_APPLICATION_ID equals e.INSURED_APPLICATION_ID join f in entities.Apps.Where(y => y.INSURED_APPLICATION_ID == queryresult.INSURED_APPLICATION_ID) on b.USERID equals f.USERID
1 回答
- 1 回答
- 0 关注
- 166 浏览
添加回答
举报
0/150
提交
取消