Example #1
0
        public async Task <ActionResult <BaseResponseDto <IEnumerable <MyUserDto> > > > GetUser()
        {
            BaseResponseDto <IEnumerable <MyUserDto> > getResponse = await _myUserService.GetUsers();

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