public MySqlPersistanceContext(IServiceProvider serviceProvider)
        {
            if (context == null)
            {
                context = serviceProvider.GetService(typeof(MySqlDbContext)) as MySqlDbContext;
            }

            context.EnsureCreated();

            userRepository       = new MySqlUserRepository(this);
            actionItemRepository = new MySqlActionItemRepositoy(this);
        }
 public MySqlActionItemRepositoy(MySqlPersistanceContext persitanceContext)
 {
     this.context        = persitanceContext.GetContext();
     this.userRepository = persitanceContext.GetUserRepository();
 }
Пример #3
0
 public MySqlUserRepository(MySqlPersistanceContext persitanceContext)
 {
     this.context = persitanceContext.GetContext();
 }