Mid EF Core

How to update only selected properties of an entity (partial updates)?

  • Attach entity, then set only modified properties as Modified.
  • Use context.Entry(entity).Property(p =>

p.PropertyName).IsModified = true.

  • Useful for PATCH operations.

More from Entity Framework Core Tutorial

All questions for this course