Пример #1
0
        public IActionResult Add(StudentViewModel input)
        {
            //_command =
            //    new RegisterStudentCommand(input.Name, input.Email, input.Phone, input.BirthDate);
            //if (!_command.IsVaild())
            //{
            //    _command.ValidationResult.
            //    List<string> _err = new List<string>();
            //    foreach (var err in _command.ValidationResult.Errors)
            //    {
            //        _err.Add(err.ErrorMessage);
            //    }

            //    return Ok(new {_err });
            //}
            _sevice.Register(input);

            var notify = _notify.GetNotify();

            if (notify.Any())
            {
                foreach (var item in notify)
                {
                    //item.Value
                }
            }

            return(Ok());
        }