public ActionResult SaveCustomer(Cutomer cus)
        {
            db.Cutomers.Add(cus);
            db.SaveChanges();

            return(View());
        }
Exemplo n.º 2
0
        public void MethodDuplicateCode(Cutomer customer, Order order, Logger logger)
        {
            Guard.Against.Null(order, nameof(order));

            if (customer == null)
            {
                throw new ArgumentException("Customer cannot be null");
            }
            if (order == null)
            {
                throw new ArgumentException("Order cannot be null");
            }
            if (logger == null)
            {
                throw new ArgumentException("Logger cannot be null");
            }
            // do actual work
        }