namespace IStation.DAL.SQLite
{
///
///
///
public partial class ScheduleRequest : Yw.DAL.SQLite.BaseDAL, IScheduleRequest
{
///
///
///
public override ConnectionConfig ConnectionConfig
{
get { return ConfigHelper.ScheduleConnectionConfig; }
}
///
///
///
///
///
public override long Insert(Entity.ScheduleRequest entity)
{
if (entity == null)
{
return 0L;
}
using SqlSugarClient sqlSugarClient = new SqlSugarClient(ConnectionConfig);
if (entity.ID > 0)
{
if (sqlSugarClient.Insertable(entity).ExecuteCommand() <= 0)
{
return 0L;
}
return entity.ID;
}
return sqlSugarClient.Insertable(entity).ExecuteReturnSnowflakeId();
}
}
}