-
-
Save christiannagel/0d72509b6737e398729a55726c615f6b to your computer and use it in GitHub Desktop.
Define shadow properties to access Azure Cosmos DB generated values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnModelCreating(ModelBuilder modelBuilder) | |
{ | |
modelBuilder.Entity<Book>().Property<string>("_self").ValueGeneratedOnAdd(); | |
modelBuilder.Entity<Book>().Property<string>("_etag").ValueGeneratedOnAddOrUpdate(); | |
modelBuilder.Entity<Book>().Property<long>("_ts").ValueGeneratedOnAddOrUpdate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment