15# Asp.Net Core 2.0 MVC - Razor view

preview_player
Показать описание
We had already created the Customer controller. In this video, we will build the Razor View which will render our view model.
------
The whole source code is on GitHub:
Рекомендации по теме
Комментарии
Автор

Best series i ever seen
Thank you very much

talkathiriify
Автор

Please help me I am facing problem while adding a new book e.g SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Books_customer_browerID". The conflict occurred in database "LiberarymanagementDb", table "dbo.customer", column 'CustomerId'.

umarfaraz
Автор

Hi,
I created the View List but when I execute the project and type /customers/list I'm getting the error "'The entity type 'CustomerViewModel' requires a primary key to be defined.'
The error does not occur if I create a field public int Id { get; set; } in CustomerViewModel.
But I Know that a ViewModel does not need a primary Key.
What am I missing ?

josecarlosmacoratti
Автор

Hi, I am getting error, when I am trying to get values from list Model.. When I try to foreach, it gives me error "object reference not set to an instance of an object".. Any ideas ?

danvyhlidal
Автор

Thanks for your extremely well describe tutorial! I'm confronting an error that for a couple of hours have not been able to resolve. The error - System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Cannot resolve scoped service from root provider.)
Source=System.Private.CoreLib
StackTrace:
at
at millisecondsTimeout, CancellationToken cancellationToken)
at
at app, IHostingEnvironment env) in 66

Inner Exception 1:
InvalidOperationException: Cannot resolve scoped service from root provider.

emiliovick