public async Task <ActionResult <MembershipDTO> > GetAction(string id) { var membership = await membershipRepository.GetDetailAsync(id); if (membership == null) { return(NotFound()); } MembershipDTO membershipDTO = new MembershipDTO(); _mapper.Map(membership, membershipDTO); return(Ok(membershipDTO)); }