public async Task <IActionResult> Post([FromBody] NewAnimalDto newAnimal) { AnimalListItemDto createdAnimal = await _animalService.Create(newAnimal); var animalUri = CreateResourceUri(createdAnimal.Id); return(Created(animalUri, createdAnimal)); }
public async Task SendCreatedAnimal(AnimalListItemDto animal) { await Clients.Others.SendAsync("ReceiveCreatedAnimal", animal); }