Skip to content

Commit

Permalink
workaround for dotnet/efcore#23830 (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogguts committed Nov 15, 2021
1 parent 2f93629 commit 21dc9f1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions samples/Basics/ReadonlyRepository/Models/BloggingContext .cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) {

modelBuilder.Entity<PostCountByBlogs>(entity => {
entity.ToView("PostCountByBlogs")
.HasNoKey();
//.HasKey(c => c.BlogId);
.HasKey(c => c.BlogId);
});
//.ToView("PostCountByBlogs").HasNoKey();

// "Blog" seed
modelBuilder.Entity<Blog>().HasData(new Blog { BlogId = 1, Url = "http://www.surfbirds.com/index.php" });
Expand Down

0 comments on commit 21dc9f1

Please sign in to comment.