internal static void Initialize(SalesContext context) { if (!_initialized) { lock (_lock) { if (_initialized) { return; } InitializeData(context); } } }
private static void InitializeData(SalesContext context) { Seed(context); }
internal static void Reset(SalesContext context) { ResetDatabase(context); }
public static void Seed(SalesContext context) { SeedDatabase(context); }
private static void ResetDatabase(SalesContext context) { context.Products.RemoveRange(context.Products); context.SaveChanges(); }