hello i have a linq query and i am going to findout average of rating in this query but its giving me error below is my query
fv1.DataSource = from st in obj.Book_details
join f in obj.Rating_tables on st.Book_Id equals f.Book_id
where st.Book_Id == book_id
select new { st.Book_Id, st.Book_index, st.Category, st.Edition, st.Authoers_Id ,f.Rating.Average()};
fv1.DataBind();
table book_detail
book_id book_namne price
1 ok 45
2 pkl 56
now another table is
rating_table
rating_id book_id rating
1 1 4
2 1 3
3 2 5
4 2 1
5 1 3
now i want to find avg rating
where my linq query is
var fgh = from st in obj.book_detail
join t in obj.rating_table st.book_id equals t.book_id
where st.book_id == bookid
select new {st.book_name , st.book_id , st.price ,}
i am new in asp.net please help me in finding average rating