You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
897 B

using OpenDBDiff.Front;
using OpenDBDiff.Schema.Model;
using OpenDBDiff.Schema.SQLServer.Generates.Generates;
using System;
namespace OpenDBDiff.Schema.SQLServer.Generates.Front
{
public class SQLServerComparer : IDatabaseComparer
{
public IDatabase Compare(IDatabase origin, IDatabase destination)
{
if (origin is Model.Database && destination is Model.Database)
{
return Generate.Compare(origin as Model.Database, destination as Model.Database);
}
else if (!(origin is Model.Database))
{
throw new NotSupportedException("Origin database type not supported: " + origin.GetType());
}
else
{
throw new NotSupportedException("Destination database type not supported: " + destination.GetType());
}
}
}
}