Skip to content

Add Support for DateOnly & TimeOnly types on SqlDataRecord #3125

@dckorben

Description

@dckorben

Since DateOnly and TimeOnly were added to NET 6, there has been some limited changes to the API to add direct paths for these new types.
 
I'd like to see SetDate and SetTime added to SqlDataRecord to bypass the need to instantiate a DateTime each time for columns with SqlDbType.Date and SqlDbType.Time. Or alternatively, overloads to SetDateTime which take these types directly.

Current workaround is to convert to a full DateTime via .ToDateTime(TimeOnly.MinValue) each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement 💡Issues that are feature requests for the drivers we maintain.Triage Done ✔️Issues that are triaged by dev team and are in investigation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions