我试图从ICollection中选择一个属性[filename]到一个List中,其中dr405有很多属性.
return GetDR405ById(c,id).dr405files.Select(p => p.FileName).ToList< String>();
public class dr405files { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int FileId { get; set; } public String TangiblePropertyId { get; set; } public String FileName { get; set; } public DateTime? UploadDate { get; set; } public Byte[] FileData {get;set;} public long? FileLength { get; set; } }
我想要SELECT [Column1] FROM [Table1]的sql等价物而不是`SELECT * FROM [Table1]