I want to update my entity using EF Core. Which one of these 2 approaches is more efficient and better to use.
Context.Entry(entity).State = EntityState.Modified
Context.SaveChanges();
and the next one is
var exist = entities.Find(entity.Id);
Context.Entry(exist).CurrentValues.SetValues(entity);
Context.SaveChanges();
both of theme do the job but which one is better?