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
P Narasimha
703
1.3k
248.3k
Ado.net entity frmawork error getting while saveChanges()
Jul 4 2013 5:56 AM
Hi All,
Please help me anybody on this.
I am getting below error while save data into database.
I am using Code firtst entity Framework.
error is this. error on Updating record "An error occurred while updating the entries. See the inner exception for details.
Model is
[Key]
public int UserId { get; set; }
public User SaveUser(User user)
{
try
{
if (user.UserId == 0)
{
var UserId = objSequenceHelper.GetNextValue(DomainModels.Enumerations.Sequences.S_SECURITY_USER);
//StoreGeneratedPattern.Identity.ToString();
user.UserId = UserId;
db.Users.Add(user);
}
else
db.Entry(user).State = System.Data.EntityState.Modified;
db.SaveChanges();
return user;
}
}
while saving geting above error .
Reply
Answers (
4
)
How can i convert the query into linq
please send basics of linq.