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(); } }
public InterestRepository(PearUpContext context) : base(context) { }
public AdminRepository(PearUpContext context) : base(context) { }
public BaseRepository(PearUpContext context) { this._dbContext = context; }
public UserRepository(PearUpContext pearUpContext) : base(pearUpContext) { }