Skip to content

Provide a mechanism for getting the next value in a sequence #8403

@ExplodingCabbage

Description

@ExplodingCabbage

Per https://docs.microsoft.com/en-us/ef/core/modeling/relational/sequences, Fluent provides a mechanism for creating sequences, but there doesn't seem to be any mechanism to get the next value from a sequence without hand-writing SQL. (At least, the docs don't mention any such mechanism, and http://stackoverflow.com/q/27077461/1709587 and http://www.talkingdotnet.com/use-sql-server-sequence-in-entity-framework-core-primary-key/ both use some SQL statement or expression like SELECT NEXT VALUE FOR dbo.TestSequence explicitly.)

This is a nuisance when I need to get sequence values from the application layer - especially combined with #1862, which forces me to step outside the EF framework to do the SELECT.

It would be useful if there were a built-in GetValueFromSequence method, or some other API for getting sequence values.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions