public decimal CalculatePostalFee() { using (FreeMarketEntities db = new FreeMarketEntities()) { decimal totalWeight = GetTotalWeightOfOrder(); if (totalWeight == 0) { return(0); } else { return((decimal)db.CalculatePostOfficeFee(totalWeight).FirstOrDefault()); } } }