public async Task <HttpStatusCodeResult> IsNameUnique([FromQuery] string name, [FromQuery] string id) { var isUnique = await _thingRepository.IsNameUnique(name); // ok or conflict return(isUnique ? Ok() : new HttpStatusCodeResult(409)); }