Exemplo n.º 1
0
        public OperationStatus InsertCustomer(Customer customer)
        {
            var opStatus = new OperationStatus {
                Status = true
            };

            try
            {
                _Context.Customers.Add(customer);
                _Context.SaveChanges();
            }
            catch (Exception exp)
            {
                opStatus.Status           = false;
                opStatus.ExceptionMessage = exp.Message;
            }
            return(opStatus);
        }