public async Task <IHttpActionResult> DeleteSummoner(SummonerModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var user = await _users.GetUserAsync(); var summoner = user.Summoners.FirstOrDefault(DbUtil.CreateComparer(model.Region, model.SummonerName)); if (summoner == null) { return(Conflict("Summoner not found.")); } if (await _summoners.RemoveAsync(model.Region, model.SummonerName)) { return(Ok()); } if (!await _flair.SetUpdateFlagAsync(new[] { user })) { return(Conflict("Unable to remove summoner.")); } return(Conflict("Unable to remove summoner.")); }