Ejemplo n.º 1
0
        public async Task <IHttpActionResult> CreateAsync(AccountDto accountDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var result = await accountbusiness.CreateAsync(accountDto);

            if (result != null)
            {
                return(Content(HttpStatusCode.OK, result));
            }
            return(Content(HttpStatusCode.InternalServerError, "Error"));
        }