internal DTOGroupMember Create(DTOGroupMember newGroupMember) { int id = _repo.Create(newGroupMember); newGroupMember.Id = id; return(newGroupMember); }
public ActionResult <DTOGroupMember> Post([FromBody] DTOGroupMember newDTOGroupMember) { try { string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; return(Ok(_gms.Create(newDTOGroupMember))); } catch (Exception e) { return(BadRequest(e.Message)); } }