public async Task <IActionResult> AddMember([FromRoute] int roleId, [FromBody] int memberId) { var group = await SingleOrError(_groupsRepo.FindOne(EntityId).Include(_ => _.Roles).ThenInclude(_ => _.Members)); var user = await SingleOrError(Repository.Get <User>().FindOne(new UserIdentifier(memberId))); await _groupsRepo.AddMember(group, roleId, user); return(Ok()); }