public ReturnMessageModel OrderUpd(OrderModel model) { ReturnMessageModel result = new ReturnMessageModel(); ObjectParameter returnMessage = new ObjectParameter("ReturnMessage", typeof(String)); using (TestDBEntities db = new TestDBEntities()) { db.SpOrderUpd(model.Id, model.UserId, model.SupplyName, model.UnitCost, model.UnitPrice, model.Markup, model.Qty, model.TotalPrice, returnMessage); result.ReturnMessage = returnMessage.Value.ToString(); return(result); } }