Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatabaseGeneratedOption.None Ignored #57

Open
soosterwaal opened this issue Dec 15, 2016 · 0 comments
Open

DatabaseGeneratedOption.None Ignored #57

soosterwaal opened this issue Dec 15, 2016 · 0 comments

Comments

@soosterwaal
Copy link

soosterwaal commented Dec 15, 2016

I have the following class:

public Message
{
      [Key]
      public long GId;

      [DatabaseGenerated(DatabaseGeneratedOption.None)]  
      public int Id;
}

I insert multiple messages with multiple Id's. After SaveChanges() all values in the fields Id are resetted to 1. GId is properly set and incremented after each insert, but Id is ALWAYS 1. It is impossible to change the value in this case!

Any known workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant