Skip to content

Commit

Permalink
Merge pull request #569 from ronnieoverby/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
SteveDunn authored Apr 18, 2024
2 parents 7a4ed38 + 8882643 commit f78cf60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,7 @@ Yes. By default, each VO is decorated with a `TypeConverter` and `System.Text.Js
Yes, although there are certain considerations. [Please see the EFCore page on the Wiki](https://stevedunn.github.io/Vogen/value-objects-in-efcore.html),
but the TL;DR is:

* If the Value Object on your entity is a struct, then you don't need to do anything special

* But if it is a class, then you need a conversion to be generated, e.g. `[ValueObject<string>(conversions: Conversions.EfCoreValueConverter)]`
* You need a conversion to be generated, e.g. `[ValueObject<string>(conversions: Conversions.EfCoreValueConverter)]`
and you need to tell EFCore to use that converter in the `OnModelCreating` method, e.g.:

```csharp
Expand Down

0 comments on commit f78cf60

Please sign in to comment.