コード例 #1
0
        public override void DeleteList()
        {
            using var dbContext = new SQLiteDbContext(DbFilename);
            var blogPostsToDelete = dbContext.BlogPosts.ToList();

            dbContext.BlogPosts.RemoveRange(blogPostsToDelete);
            dbContext.SaveChanges();
        }
コード例 #2
0
 public override void CreateList()
 {
     using var dbContext = new SQLiteDbContext(DbFilename);
     dbContext.BlogPosts.AddRange(BlogPosts.List);
     dbContext.SaveChanges();
 }