Exemplo n.º 1
0
        public async Task <IActionResult> PostProjectAsync([FromBody] MemberModel obj)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var isMemberAdded = await _memberService.AddNewMemberAsync(obj);

            _response.Status  = isMemberAdded.Status;
            _response.Message = isMemberAdded.Message;

            if (_response.Status)
            {
                return(Ok(_response));
            }
            else
            {
                return(BadRequest(_response));
            }
        }