I created an ASP.NET MVC 4 application using Visual Studio 2012. The application is just normal and I did nothing fancy. Indeed no-coding at all.
(The default app seems to be using Localdb, simple membership implemented using AccountController
)
I ran the application, clicked Register
and created a user.
Then, I went to the Server Explorer
, navigated to the table UserProfile
, right-clicked the table and clicked New Query
And executed this query
insert into dbo.UserProfile (UserId,UserName)
values ("test", "test")
This results in
Msg 207, Level 16, State 1, Line 1
Invalid column name 'test'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'test'.
Note: I also executed Enable-Migrations
using Package Manager Console
but the error message still comes.
Any ideas why ?
Update 1:
According to @CodeCaster's answer, I executed with ['] single quotes and it seems to be working fine.
However, now I get
Cannot insert explicit value for identity column in table 'UserProfile' when IDENTITY_INSERT is set to OFF