public override bool Exclude(Migration migration)
        {
            if (migration == null)
                return false;

            return migration.GetType()
                .GetCustomAttributes(true)
                .OfType<ExperimentalAttribute>()
                .Any();
        }
 public static bool HasExperimentalAttribute(Migration migration)
 {
     if (migration == null)
     {
         return(false);
     }
     return(migration.GetType()
            .GetCustomAttributes(true)
            .OfType <ExperimentalAttribute>()
            .Any());
 }
Ejemplo n.º 3
0
 public override bool Exclude(Migration migration)
 {
     if (migration == null)
     {
         return(false);
     }
     return(migration.GetType()
            .GetCustomAttributes(true)
            .OfType <ExperimentalAttribute>()
            .Any());
 }
Ejemplo n.º 4
0
 protected virtual void OnMigrationException(Migration migration, Exception exception)
 {
     var message = new
     {
         Message = "Migration failed to be applied: " + exception.Message,
         migration.Version,
         Name = migration.GetType(),
         migration.Description,
         DatabaseName = Database.Name
     };
     Console.WriteLine(message);
     throw new MigrationException(message.ToString(), exception);
 }
Ejemplo n.º 5
0
        protected virtual void OnMigrationException(Migration migration, Exception exception)
        {
            var message = new
            {
                Message = "Migration failed to be applied: " + exception.Message,
                migration.Version,
                Name = migration.GetType(),
                migration.Description,
                Database.DatabaseNamespace.DatabaseName
            };

            Console.WriteLine(message);
            throw new MigrationException(message.ToString(), exception);
        }
Ejemplo n.º 6
0
        protected virtual void OnMigrationException(Migration migration, Exception exception)
        {
            var message = new
            {
                Message = "Migration failed to be applied: " + exception.Message,
                migration.Version,
                Name = migration.GetType(),
                migration.Description,
                DatabaseName
            };

            _logger.LogError(exception, message.ToString());
            throw new MigrationException(message.ToString(), exception);
        }