static void addNewCustomerProductListWithSP(int productId, int customerId, int amount) { YTUEFEntities context = new YTUEFEntities(); #region ilk kullanım //int result = context.addNewCustomerProductList(customerId, productId, amount, 100M, DateTime.Now); #endregion #region Product ID değerine göre listprice * amount olarak kullanımı var theProduct = context.Products.Find(productId); if (theProduct != null) { context.addNewCustomerProductList(customerId, productId, amount, (theProduct.ListPrice * amount), DateTime.Now); } #endregion }