namespace IStation.DAL.SQLite
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class HydraulicModelValidation : Yw.DAL.SQLite.BaseDAL<Entity.HydraulicModelValidation>, IHydraulicModelValidation
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public override ConnectionConfig ConnectionConfig
|
{
|
get { return ConfigHelper.HydraulicConnectionConfig; }
|
}
|
|
|
/// <summary>
|
///
|
/// </summary>
|
/// <param name="entity"></param>
|
/// <returns></returns>
|
public override long Insert(Entity.HydraulicModelValidation 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();
|
}
|
|
}
|
}
|