TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sreekanth Reddy
352
4.8k
420.6k
Error on saveChanges() in MVC
Nov 21 2014 9:06 AM
I am doing insertion operation in MVC with Code first approach:
My Model class:
public class RegUsers1
{
[key]
public int Uid { set; get; }
public string FullName { set; get; }
public string Email { set; get; }
public string Password { set; get; }
public string Gender { set; get; }
public string Qualification { set; get; }
}
In my controller:
[HttpPost]
public ActionResult Register(RegUsers u)
{
db.Users.Add(u);
db.SaveChanges();
return RedirectToAction("Home");
}
while inserting it is throwing an error as:
"An error occurred while updating the entries. See the inner exception for details. "
Please solve it friends.
Reply
Answers (
2
)
Primary Key for model in code first approach
How can server PC access the SQL Server data of Clients PC u