EFCore.SqlServer.NodaTime icon indicating copy to clipboard operation
EFCore.SqlServer.NodaTime copied to clipboard

Fix example with Year() in README

Open daniel-jann opened this issue 3 years ago • 2 comments

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

daniel-jann avatar Jul 07 '22 10:07 daniel-jann

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.

daniel-jann avatar Jul 07 '22 11:07 daniel-jann

@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?

StevenRasmussen avatar Aug 13 '23 02:08 StevenRasmussen