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