internal DTOGroupMember Create(DTOGroupMember newGroupMember)
        {
            int id = _repo.Create(newGroupMember);

            newGroupMember.Id = id;
            return(newGroupMember);
        }
Exemple #2
0
 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));
     }
 }