Example #1
0
        public Response <bool> Insert(CustomerDTO customerDTO)
        {
            var response = new Response <bool>();

            try
            {
                var customer = mapper.Map <Customer>(customerDTO);
                response.Data = customerDomain.Insert(customer);
                if (response.Data)
                {
                    response.IsSuccess = true;
                    response.Message   = "Registro exitoso";
                }
            }
            catch (Exception e)
            {
                response.Message = e.Message;
            }
            return(response);
        }