Browse Source

Update Object-Extensions.md

pull/3546/head
Halil İbrahim Kalkan 6 years ago
parent
commit
04cd0eae4d
  1. 12
      docs/en/Object-Extensions.md

12
docs/en/Object-Extensions.md

@ -105,3 +105,15 @@ user.SetTitle("My Title");
var title = user.GetTitle();
````
## Object Extension Manager
While you can set arbitrary properties to an extensible object (which implements the `IHasExtraProperties` interface), `ObjectExtensionManager` is used to explicitly define extra properties for extensible classes.
Explicitly defining an extra property has some use cases:
* Allows to control how the extra property is handled on object to object mapping (see the section below).
* Allows to define metadata for the property. For example, you can map an extra property to a table field in the database while using the [EF Core](Entity-Framework-Core.md).
### AddOrUpdate
`AddOrUpdate` is the main method to define a new extra property or update an extra property definition.
Loading…
Cancel
Save