public SqliteMigrationsSqlGenerator(
     [NotNull] SqliteUpdateSqlGenerator sql,
     [NotNull] SqliteTypeMapper typeMapper,
     [NotNull] SqliteMetadataExtensionProvider annotations)
     : base(sql, typeMapper, annotations)
 {
 }
        public SqliteHistoryRepository(
            [NotNull] IRelationalConnection connection,
            [NotNull] DbContext context,
            [NotNull] SqliteUpdateSqlGenerator sql)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sql, nameof(sql));

            _connection = connection;
            _contextKey = context.GetType().FullName;
            _sql = sql;
        }
Beispiel #3
0
        public SqliteHistoryRepository(
            [NotNull] IRelationalConnection connection,
            [NotNull] DbContext context,
            [NotNull] SqliteUpdateSqlGenerator sql)
        {
            Check.NotNull(connection, nameof(connection));
            Check.NotNull(context, nameof(context));
            Check.NotNull(sql, nameof(sql));

            _connection = connection;
            _contextKey = context.GetType().FullName;
            _sql        = sql;
        }
 public SqliteHistoryRepository(
     [NotNull] IDatabaseCreator databaseCreator,
     [NotNull] ISqlStatementExecutor executor,
     [NotNull] IRelationalConnection connection,
     [NotNull] IDbContextOptions options,
     [NotNull] IMigrationsModelDiffer modelDiffer,
     [NotNull] SqliteMigrationsSqlGenerator sqlGenerator,
     [NotNull] SqliteMetadataExtensionProvider annotations,
     [NotNull] SqliteUpdateSqlGenerator sql)
     : base(
         databaseCreator,
         executor,
         connection,
         options,
         modelDiffer,
         sqlGenerator,
         annotations,
         sql)
 {
 }
Beispiel #5
0
        private static IHistoryRepository CreateHistoryRepository()
        {
            var annotationsProvider = new SqliteMetadataExtensionProvider();
            var updateSqlGenerator  = new SqliteUpdateSqlGenerator();

            return(new SqliteHistoryRepository(
                       Mock.Of <IRelationalDatabaseCreator>(),
                       Mock.Of <ISqlStatementExecutor>(),
                       Mock.Of <IRelationalConnection>(),
                       new DbContextOptions <DbContext>(
                           new Dictionary <Type, IDbContextOptionsExtension>
            {
                { typeof(SqliteOptionsExtension), new SqliteOptionsExtension() }
            }),
                       new MigrationsModelDiffer(
                           annotationsProvider,
                           new SqliteMigrationsAnnotationProvider()),
                       new SqliteMigrationsSqlGenerator(
                           updateSqlGenerator,
                           new SqliteTypeMapper(),
                           annotationsProvider),
                       annotationsProvider,
                       updateSqlGenerator));
        }
        private static IHistoryRepository CreateHistoryRepository()
        {
            var annotationsProvider = new SqliteMetadataExtensionProvider();
            var updateSqlGenerator = new SqliteUpdateSqlGenerator();

            return new SqliteHistoryRepository(
                Mock.Of<IRelationalDatabaseCreator>(),
                Mock.Of<ISqlStatementExecutor>(),
                Mock.Of<IRelationalConnection>(),
                new DbContextOptions<DbContext>(
                    new Dictionary<Type, IDbContextOptionsExtension>
                    {
                        { typeof(SqliteOptionsExtension), new SqliteOptionsExtension() }
                    }),
                new MigrationsModelDiffer(
                    annotationsProvider,
                    new SqliteMigrationsAnnotationProvider()),
                new SqliteMigrationsSqlGenerator(
                    updateSqlGenerator,
                    new SqliteTypeMapper(),
                    annotationsProvider),
                annotationsProvider,
                updateSqlGenerator);
        }