public override void DeleteList() { using var dbContext = new SQLiteDbContext(DbFilename); var blogPostsToDelete = dbContext.BlogPosts.ToList(); dbContext.BlogPosts.RemoveRange(blogPostsToDelete); dbContext.SaveChanges(); }
public override void CreateList() { using var dbContext = new SQLiteDbContext(DbFilename); dbContext.BlogPosts.AddRange(BlogPosts.List); dbContext.SaveChanges(); }