using Monitor.Models;
using Monitor.Repositories;
namespace DataBase.MySql.Tool
{
///
/// 每天能耗统计操作类
///
public class SEgElecDayStatistics
{
private TEgElecDayStatisticRepository _dalEgElecDayStatisticRepository;
public SEgElecDayStatistics()
{
_dalEgElecDayStatisticRepository = new TEgElecDayStatisticRepository(DBTool.Instance.MyDbContext());
}
///
/// 添加每天能耗统计值
///
///
///
public async Task AddElecDayStatistic(TEgElecDayStatistic val)
{
await _dalEgElecDayStatisticRepository.DelBy(a => a.FStartTime == val.FStartTime);
return await _dalEgElecDayStatisticRepository.Insert(val);
}
}
}