using System.Data.Entity;
public static void Main()
using (var context = new EntityContext())
var countries1 = context.Countries.Cache().ToList();
var countries2 = context.Countries.Cache().ToList();
FiddleHelper.WriteTable(countries2);
public static void GenerateData()
using (var context = new EntityContext())
context.Countries.Add(new Country() { Name ="Customer_A" });
context.Countries.Add(new Country() { Name ="Customer_B" });
context.Countries.Add(new Country() { Name ="Customer_C" });
public class EntityContext : DbContext
public EntityContext() : base(FiddleHelper.GetConnectionStringSqlServer())
public DbSet<Country> Countries { get; set; }
public int CountryID { get; set; }
public string Name { get; set; }