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.
26 lines
604 B
26 lines
604 B
using System.Data.Common;
|
|
using System.Data.SqlServerCe;
|
|
using System.IO;
|
|
|
|
namespace NzbDrone.SqlCe
|
|
{
|
|
public class SqlCeProxy
|
|
{
|
|
public void EnsureDatabase(string connectionString)
|
|
{
|
|
var connection = new SqlCeConnection(connectionString);
|
|
|
|
if (!File.Exists(connection.Database))
|
|
{
|
|
var engine = new SqlCeEngine(connectionString);
|
|
engine.CreateDatabase();
|
|
}
|
|
}
|
|
|
|
public DbProviderFactory GetSqlCeProviderFactory()
|
|
{
|
|
return new SqlCeProviderFactory();
|
|
}
|
|
}
|
|
}
|