コード例 #1
0
        public async Task <ActionResult <BaseResponseDto <MyUserDto> > > AddUser(MyUser user)
        {
            BaseResponseDto <MyUserDto> getResponse = await _myUserService.CreateUser(user);

            if (!getResponse.HasError || getResponse.Data != null)
            {
                return(Ok(getResponse.Data));
            }
            else if (!getResponse.HasError || getResponse.Data == null)
            {
                return(NotFound());
            }
            else
            {
                return(BadRequest(getResponse.Errors));
            }
        }