Exemple #1
0
        public IHttpActionResult AddAccount([FromBody] AccountDTO account)
        {
            if (string.IsNullOrEmpty(account.Name) || string.IsNullOrEmpty(account.PhoneNumber) ||
                string.IsNullOrEmpty(account.Email) || string.IsNullOrEmpty(account.Login))
            {
                return(BadRequest());
            }

            if (_bll.AddAccount(account))
            {
                return(Ok());
            }
            return(InternalServerError());
        }