PDA

View Full Version : خطای Sequence contains در زمان ایجاد یک ViewModel



pouria_bayat
دوشنبه 22 شهریور 1395, 09:04 صبح
سلام دوستان از دیشب یکدفعه برنامه بالا نمیاد و خطای :


Sequence contains more than one element
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.InvalidOperationException: Sequence contains more than one element



رو میده خطی که این خطا رو میگیره:

iewModel = new ShoppingCartViewModel(BC, "نرم افزار", BC.Product.Cost, false);

:گریه::گریه::گریه::گریه:

Moien Tajik
دوشنبه 22 شهریور 1395, 15:46 عصر
کد کامل Action رو قرار بدید .

pouria_bayat
سه شنبه 23 شهریور 1395, 22:24 عصر
مشگل حل شد. دیتابیس را پاک کردم و مجددا ساختم ممنونم.