I have following code in my page:
var myVar= Entity.SetName
.Where(p => int.Parse(p.ID) >= start &&
int.Pars
private void LoadDetail(int id)
{
var sp = from category in db.ProductCategories
join product in db.Products on category.ProductCategoryID equals product.ProductCategoryID
where id == int.Parse(category.ProductCategoryID)
select new
{
product.ProductID,
product.ProductName,
product.ProductCode,
product.Deception,
category.CategoryName,
product.Quanrity,
product.Price
};
DGVDetail.DataSource = sp.ToList();//help: Error: LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method, and this method cannot be translated into a store expression
}
private void DGVMaster_CellClick(object sender, DataGridViewCellEventArgs e)
{
int index = e.RowIndex;
LoadDetail(index + 1);
}