Actually I am using C# entity. I have added new Entity class for newly added table in .edmx file manually.The issue is can get all rows with all column from DB. But cann't select specific column using select new {}. actual error is Error CS0012 The type 'DbDataRecord' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxx'.
This query working fine and it brings all the rows from DB
var listQuery = objReport.Batter_YTD_Tbl.ToList();
When i try like below throwing error
(from YTD_Tbl in objReport.Batter_YTD_Tbl
select new { test = YTD_Tbl.AB})
.ToList();
The error is
Error CS0012 The type 'DbDataRecord' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxx'. 805AdminPortal.Reports D:\xampp\htdocs\805\AdminSite-Starting-Code\805AdminPortal.Reports\Reports\PregameReport.cs 50 Active