using Admin.Core.IRepository; using Admin.Core.IService; using Admin.Core.Model; using log4net; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Admin.Core.Service { public class DetailElectricalinspectionServices : BaseServices, IDetailElectricalinspectionService { private IBaseRepository _dal; private static readonly log4net.ILog _logger = LogManager.GetLogger(typeof(DetailElectricalinspectionServices)); public DetailElectricalinspectionServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } public bool InsertRangeDetailElectricalinspection(List detailElectricalinspections) { bool result = false; try { var r = _dal.AddAsync(detailElectricalinspections).Result; if (r>0) { result = true; } } catch (Exception ex) { _logger.Error($"电检明细数据保存异常:{ex.Message}"); } return result; } } }