public string Save(CustomerModel param)
        {
            CustomerModelValidator validator = new CustomerModelValidator();

            validator.ValidateAndThrow(param);
            return(_CustomerService.SaveCustomer(param));
        }
Example #2
0
        public async Task <CustomerModel> SaveCustomer(CustomerModel customer)
        {
            var validator = new CustomerModelValidator();

            validator.ValidateAndThrow(customer);

            return(await _httpClient.PostJsonAsync <CustomerModel>("/api/customer/save", customer));
        }
        public string SaveCustomer(CustomerModel param)
        {
            CustomerModelValidator validator = new CustomerModelValidator();

            validator.ValidateAndThrow(param);
            var c = _CustomerRepository.SaveCustomer(param);

            return("");
        }