アイテムを取得する DAL メソッドがあります。アイテムは DAL メソッドに存在しますが、呼び出し元のコードには存在しません。そんなことがあるものか?
呼び出しコード:
IEnumerable<InstallationSummary> installationSummaryList =
InstallationSummaryLogic.GetByServerAppAndGroup(appServer, appWithValidGroup);
アイテムが実際に存在することを示す DAL メソッド:
コードを呼び出しています。アイテムは表示されていません。彼らはどこに行きましたか?
(これは、この質問の上部に表示されているのと同じ行です。)
DAL メソッドと呼び出しコードの間の唯一のものは、単なるパススルーであるロジック クラスです。完全を期すために、ここに含めました。
public static IEnumerable<InstallationSummary> GetByServerAppAndGroup(ApplicationServer appServer, ApplicationWithOverrideVariableGroup appWithGroup)
{
return DataAccessFactory.GetDataInterface<IInstallationSummaryData>().GetByServerAppAndGroup(appServer, appWithGroup);
}
編集 - DAL メソッド全体を表示
public IEnumerable<InstallationSummary> GetByServerAppAndGroup(ApplicationServer appServer, ApplicationWithOverrideVariableGroup appWithGroup)
{
IQueryable<InstallationSummary> summaries = this.Database.InstallationSummaries
.Include(x => x.ApplicationServer)
.Include(x => x.ApplicationWithOverrideVariableGroup.Application)
.Include(x => x.ApplicationWithOverrideVariableGroup.CustomVariableGroup)
.Where(x => x.ApplicationServer.IdForEf == appServer.IdForEf)
.Where(x => x.ApplicationWithOverrideVariableGroup.Application.IdForEf == appWithGroup.Application.IdForEf);
if (appWithGroup.CustomVariableGroup == null)
{
return summaries.Where(x => x.ApplicationWithOverrideVariableGroup.CustomVariableGroup == null);
}
return summaries
.Where(x =>
x.ApplicationWithOverrideVariableGroup != null &&
x.ApplicationWithOverrideVariableGroup.CustomVariableGroup != null &&
x.ApplicationWithOverrideVariableGroup.CustomVariableGroup.IdForEf == appWithGroup.CustomVariableGroup.IdForEf);
}