SQL Server While creating shopping app in ASP.NET I am passing Id of the product but when I hit details the Id automatically came as 1 every time [closed]

bxgwgixi  于 2024-01-05  发布在  .NET
关注(0)|答案(1)|浏览(138)

Closed. This question needs details or clarity . It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post .

Closed 5 hours ago.
Improve this question

When I hit details button

Here Id is coming as 4 as it should

But as I goes on the id from database come as 1 and it show data of id 1 in the database.

I Was Expecting that details form database should come as the Id was selected at app

nukf8bse

nukf8bse1#

Try linq like following:

  1. var productsInDb = _unitOfWork.product.where(u => u.Id == id, includeProperties: "Category:CoverType").FirstOrDefault();

相关问题