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
Naruto Reddy
NA
123
38.9k
Achieve ADDorUpdate() using EF Core
Jun 18 2020 6:34 AM
Hello Experts,
I want to achieve the ADDorUpdate() method in Generic repository using EF Core like below?
Can anyone help me?
public virtual void AddOrUpdate(T entity)
{
#region Argument Validation
if (entity == null)
{
throw new ArgumentNullException("entity");
}
#endregion
DbSet.AddOrUpdate(e => e.Id, entity);
this.DbContext.SaveChanges();
}
Reply
Answers (
0
)
How to add role authorization in asp.net core mvc
How to replace image in word .docx file using open xml sdk