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