// PUT: api/GroupUsers/5 public async Task <string> Put(int id, GetGroupUsersDto entity) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } await GroupUserGenericFacade.UpdateAsync(entity); return($"Updated GroupUser with id: {id}"); }
// POST: api/GroupUsers public async Task <string> Post(GetGroupUsersDto entity) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var groupUserid = await GroupUserGenericFacade.CreateAsync(entity); if (groupUserid.Equals(0)) { throw new HttpResponseException(HttpStatusCode.BadRequest); } return($"Created GroupUser with id: {groupUserid}"); }