private static void SeedCategories(RssStorage context) { if (context.Categories.SingleOrDefault(_ => _.Id == 1) == null) { Category defaultCategory = new Category("default", ""); context.Categories.Add(defaultCategory); context.SaveChanges(); } }
internal static void Go(RssStorage context) { SeedCategories(context); }
//TODO:: manage instance public StorageManager() { UnitOfWork = new UnitOfWork(); Storage = (RssStorage)UnitOfWork.RssStorage; }