public CorePersistenceContext(IServiceProvider serviceProvider)
        {
            if (context == null)
            {
                context = serviceProvider.GetService <CoreDbContext>();
            }

            context?.Database.Migrate();

            actionItemRepository = new ActionItemRepository(context);
            userRepository       = new UserRepository(context);
        }
Пример #2
0
 public ActionItemRepository(CoreDbContext context)
 {
     this.context = context;
 }
Пример #3
0
 public UserRepository(CoreDbContext context)
 {
     this.context = context;
 }