StevenRasmussen / EFCore.SqlServer.NodaTime

NodaTime support for EF Core
MIT License
109 stars 18 forks source link

Fix example with Year() in README #30

Open daniel-jann opened 2 years ago

daniel-jann commented 2 years ago

The example for the DATEPART Support in the README is using the extension method Year() but this is actually a native Property.

daniel-jann commented 2 years ago

I just found out that actually the Year is supported as native, not extension method. I missed the fact that some were supported as native instead of extension methods. I'll change this issue to actually fix the documentation instead.

StevenRasmussen commented 1 year ago

@daniel-jann - The example in the docs refers to an Instant which does not have a property called Year and so it is exposed via an extension method. That being said, there’s no way to look at the documentation to know which NodaTime type is being referred to and so the documentation could be improved in this aspect. Maybe a table displaying each supported NodaTime type and whether the part is supported by a native property or an extension method might be a better approach?