public decimal GetAvgOrderAmount(string startDate, string endDate) { using (var db = new PermaisuriCMSEntities()) { //注意,第一个输出参数的名称必须与Store Procedure里面的输出参数的名称一一对应!不区分大小写 var retVal = db.Ecom_AvgOrderAmount_SP(startDate, endDate); return(retVal.First().AvgOrderAmount.ConvertToNotNull()); } }