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