-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferenceFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorDataRelated to Microsoft.Extensions.VectorData
Description
There are two problems arising from a struct record:
- When Upsert is used with database key generation, the key needs to be injected into the record type; for structs, that requires the record to be a
refparameter, which complicates the signature for everyone etc. - For Get, null is returned for classes when a record isn't found. For structs, the distinction between "not found" and "found but happens to be the default" can't easily be maintained; we can modify the API in various complicated/unfriendly ways to make this possible, but it doesn't seem worth it.
- FWIW EF also constrains entity types to be classes (for similar reasons, but also since EF implements change tracking).
We don't believe there's enough need for struct record types, so we'll constrain TRecord to be class.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferenceFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorDataRelated to Microsoft.Extensions.VectorData
Type
Projects
Status
Sprint: Done