私は、次のLINQ文を持っています。また、ファイルテーブルをインクルードし、SettingFileを持つすべてのファイルを取得したいと考えています。しかし、私は次のエラーを取得維持:ここLINQのを含めるとWhere句
Cannot implicity convert type IEnumerable(UploadedFile) to bool.
は私にUploadedFileモデルです:ここで
[Required]
public string FileName { get; set; }
[Required]
public string FileExtension { get; set; }
[Required]
public byte[] FileContent { get; set; }
public Guid? FormAnswerId { get; set; }
public Guid? LicenseHolderId { get; set; }
public Guid? CaseId { get; set; }
public Guid? ErrandId { get; set; }
public bool SettingFile { get; set; }
は私の設定-モデルです:
public class Setting : ModelBase
{
public string Key { get; set; }
public string DisplayName { get; set; }
public string DisplayText { get; set; }
public string DisplayTab { get; set; }
public string Value { get; set; }
public string Type { get; set; }
public virtual ICollection<UploadedFile> Files { get; set; }
}
Modelbase:
public abstract class ModelBase : EntityBase
{
public DateTime? Deleted {get; set;}
}
質問に間違っていますか?
、この '.Whereしてみてください(yは=> y.Files.Any(=> f.SettingFile F ==真))' – Magnetron