Example #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();
     }
 }
Example #2
0
 internal static void Go(RssStorage context)
 {
     SeedCategories(context);
 }
Example #3
0
 //TODO:: manage instance
 public StorageManager()
 {
     UnitOfWork = new UnitOfWork();
     Storage    = (RssStorage)UnitOfWork.RssStorage;
 }