Ejemplo n.º 1
0
        public static void Initialize(PearUpContext context, IHashingService hashingService, IUserFactory userFactory)
        {
            context.Database.Migrate();

            if (!context.Admins.Any())
            {
                var admins = SeedDataHelper.GetAdmins(hashingService);
                context.Admins.AddRange(admins);
                context.SaveChanges();
            }

            if (!context.Interests.Any())
            {
                var interests = SeedDataHelper.GetInterests();
                context.Interests.AddRange(interests);
                context.SaveChanges();
            }
        }
Ejemplo n.º 2
0
 public InterestRepository(PearUpContext context) : base(context)
 {
 }
Ejemplo n.º 3
0
 public AdminRepository(PearUpContext context) : base(context)
 {
 }
Ejemplo n.º 4
0
 public BaseRepository(PearUpContext context)
 {
     this._dbContext = context;
 }
Ejemplo n.º 5
0
 public UserRepository(PearUpContext pearUpContext) : base(pearUpContext)
 {
 }