using System.Data.Entity;
using System.Collections.Generic;
public static void Main()
using (var context = new BookStore())
List<Author> authors = GetAuthorsList();
context.BulkInsert(authors);
FiddleHelper.WriteTable(context.Authors.Take(5).ToList());
public static List<Author> GetAuthorsList()
List<Author> list = new List<Author>();
for(int i = 0; i < 1000; i++)
list.Add(new Author() { Name ="author_" + i});
public class BookStore : DbContext
public BookStore() : base(FiddleHelper.GetConnectionStringSqlServer())
public DbSet<Author> Authors { get; set; }
public int AuthorId { get; set; }
public string Name { get; set; }