Naruto Reddy

Naruto Reddy

  • 1.8k
  • 120
  • 2.5k

DbSet does not contain a definition for AddorUpdate

Jun 17 2020 12:48 PM
Hi Everyone,
 
Do we have any alternate method for AddorUpdate in EF Core .
  1. public virtual void AddOrUpdate(T entity)  
  2. { #region Argument Validation if (entity == null)  
  3. throw new ArgumentNullException("entity");  
  4. }  
  5. #endregion  
  6. DbSet.AddOrUpdate(e => e.Id, entity);  
  7. SaveChanges();  
  8. }  
I am getting an error at "DbSet does not contain a definition for AddorUpdate", Method can anyone help on this.

Brought to you by:

Answers (1)