only specific columns in Linq

115

only specific columns in Linq -

using (var context = new LINQEntities())
            {
                var fileCollection = context.FileRepository.Where(a => a.IsDeleted == false).
                    Select(a => new
                    {
                        FilePath = a.FilePath
                    }
                ).ToList();
            }

Comments

Submit
0 Comments