Reputation: 1866
I am running Select Statement along with Where condition but it gives me 0
data.
Code :
public ActionResult ExportReport(int uid)
{
GridView gv = new GridView();
gv.DataSource = db.tbl_demo.Where(x => x.UID == uid).
Select(x=> new { CustomerName = x.CUST_NAMER,ID=x.UID})
.FirstOrDefault();
}
Upvotes: 1
Views: 85
Reputation: 536
Your Code Statement has no problem Check Your DBContext Code Configuration
Upvotes: 1