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