/// <summary> /// 删除度量日志 /// </summary> /// <param name="methodName"></param> /// <param name="CostTime"></param> /// <param name="bgDt"></param> /// <param name="endDt"></param> /// <param name="pageModel"></param> /// <returns></returns> public bool Delete(string methodName, int CostTime, DateTime bgDt, DateTime endDt) { MetricsManager metricsManager = new MetricsManager(); System.Linq.Expressions.Expression <Func <Enties.Metrics, bool> > express = Expressionable.Create <WXQ.Enties.Metrics>() .AndIF(!string.IsNullOrEmpty(methodName), m => SqlFunc.Contains(m.MethodName, methodName)) .AndIF(bgDt < DateTime.Now, m => m.AddDateTime >= bgDt) .AndIF(endDt >= bgDt, m => m.AddDateTime <= endDt) .AndIF(CostTime > 0, m => m.CostTime > CostTime) .ToExpression();//拼接表达式 return(metricsManager.Delete(express)); }