سلام من دارم یه سایت فروشگاه مینویسم
ولی به Any در این خط گیر میده.. فکر کنم به خاطر ابنه که ParentID , nullable هست
var ProductCategory = context.Categories.Where(x => x.ParentID.Any(z => z.ID== id)).ToList();
حالا چی کار باید کنم که درست بشه؟؟
متن خطا را قرار دهید
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Delta(Int32)' in 'Alborz.Controllers.HomeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
فکر کنم id که دادید null هست
چک کنید مقدار داشته باشه
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)