34. ORDER MODEL VALIDATION - Asp.Net CORE MVC

34. ORDER MODEL VALIDATION - Asp.Net CORE MVC

Ervis Trupja

7 лет назад

8,805 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Caranthirn
Caranthirn - 13.05.2020 13:45

Shopping Cart Error doesnt displayed on the view sadly. It gives error but you cant see it. Any solutions ?

Ответить
Ursu Nicolae
Ursu Nicolae - 25.03.2020 15:19

If someone have the error:The INSERT statement conflicted with the FOREIGN KEY constraint "FK_OrderDEtails_Orders_OrderId". The conflict occurred in database "DrinkStore", table "dbo.Orders", column 'OrderId'.
The statement has been terminated.
just add _appDbContext.SaveChanges(); after _appDbContext.Orders.Add(order); in OrderRepository

Ответить
Nhân Nguyễn Hữu
Nhân Nguyễn Hữu - 21.11.2018 12:54

sorry for bothering you but i have an error when i proceed to checkout it said that "InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'MobileStore.Data.Models.Order', but this ViewDataDictionary instance requires a model item of type 'MobileStore.ViewModels.CheckoutViewModel'." checkoutviewmodel is a model include Order and ShoppingCart model and in the OrderController i followed your instructions. so please help me solve it. thank u!

Ответить
Pablo
Pablo - 26.01.2018 23:03

Very good tutorial. Why there's no payment structure for the order?.. That would be the only thing missing to make it a complete application...thanks

Ответить
david ekene
david ekene - 22.12.2017 02:00

Hi Ervis, it has finally worked. im so happy.. thanks alot

Ответить
david ekene
david ekene - 21.12.2017 23:10

Hi Ervis, I mistakenly deleted some tables from my database in the server explorer. I deleted orderid and orderdetails. I have been getting some exceptions when I run the application. How do I get these tables back? They are even in my migration, whenever I right “update-database, they don’t still reflect on the database. How do I go about this?

Ответить