using SqlSugar;
using System.IO;
namespace AStation.DAL
{
///
/// 数据来源
///
public class MonitorDataSources : BaseDAL_Sorter_Flags_TagName
{
/*public override string FileName
{
get { return FileHelper.GetFilePath(); }
}
*/
public override ConnectionConfig ConnectionConfig
{
get { return ConnectionFactory.BuildConnection(); }
}
public override bool DeleteByID(long id)
{
var bol = base.DeleteByID(id);
if (bol)
{
var folder = FileHelper.GetWorkFolder();
var monitorDataSourcesFolder = Path.Combine(folder, id.ToString());
if (Directory.Exists(monitorDataSourcesFolder))
{
Directory.Delete(monitorDataSourcesFolder, true);
}
}
return bol;
}
}
}