1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/NzbDrone.SqlCe/SqlCeProxy.cs

26 lines
574 B
C#
Raw Normal View History

2013-02-17 00:10:20 +03:00
using System.Data.Common;
using System.Data.SqlServerCe;
using System.IO;
namespace NzbDrone.SqlCe
{
public class SqlCeProxy
{
public void EnsureDatabase(string constr)
2013-02-17 00:10:20 +03:00
{
var connection = new SqlCeConnection(constr);
2013-02-17 00:10:20 +03:00
if (!File.Exists(connection.Database))
{
var engine = new SqlCeEngine(constr);
2013-02-17 00:10:20 +03:00
engine.CreateDatabase();
}
}
public DbProviderFactory GetSqlCeProviderFactory()
{
return new SqlCeProviderFactory();
}
}
}