An unhandled exception occurred while processing the request. SqlException: Invalid object name 'Question'. Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__164_0(Task<SqlDataReader> result)[Answered]RSS
I am working on an asp.net core mvc, and i use this command to map a database tables:-
PM> Scaffold-DbContext "Server=(localdb)\ProjectsV13;Database=LandingPage;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
Build started...
Build succeeded.
The EF Core tools version '3.1.0' is older than that of the runtime '3.1.3'. Update the tools for the latest features and bug fixes.
then i create a new controller class, and when i access the controller i got this exception:-
Member
488 Points
2558 Posts
An unhandled exception occurred while processing the request. SqlException: Invalid object name '...
May 07, 2020 12:48 AM|johnjohn123123|LINK
I am working on an asp.net core mvc, and i use this command to map a database tables:-
then i create a new controller class, and when i access the controller i got this exception:-
Can anyone advice on this please?
Contributor
4923 Points
4200 Posts
Re: An unhandled exception occurred while processing the request. SqlException: Invalid object na...
May 07, 2020 01:07 AM|DA924|LINK
You need to validate the name of the database table. Is it named 'Question' or is it named something else?