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()); }
public override bool Exclude(Migration migration) { if (migration == null) { return(false); } return(migration.GetType() .GetCustomAttributes(true) .OfType <ExperimentalAttribute>() .Any()); }
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); }
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); }
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); }