public ActionResult Create(PaymentViewModel item) { try { return RedirectToAction("Index"); } catch { return View(); } }
private void GeneratePayment(int orderId) { if (orderId > 1) { var newPayment = new PaymentViewModel() { OrderId = orderId, // CommissionId = 1, DtCreated = DateTime.UtcNow, DtUpdated = DateTime.UtcNow, DiscountAllowed = 10 }; db.Payments.Add(newPayment); db.SaveChanges(); } }