Пример #1
0
        public RegistrationReponse Registration(DTOs.Customer customer)
        {
            if (_customersQueryProcessor.Exists(customer.Username))
            {
                return(new RegistrationReponse
                {
                    AlreadyExists = true
                });
            }

            _customersQueryProcessor.Save(customer);

            return(new RegistrationReponse()
            {
                AlreadyExists = false
            });
        }
Пример #2
0
 public DTOs.Customer Save([FromBody] DTOs.Customer customer)
 {
     return(_customersQueryProcessor.Save(customer));
 }