public async Task <ActionResult <Assistant> > CreateAsync([FromBody] Assistant assistant) { string nameOfAction = nameof(GetByIdAsync); Debug.Print("--> POST: " + JsonConvert.SerializeObject(assistant)); var newAssistant = Assistant.Create(assistant.Name.First, assistant.Name.Last, assistant.GenderType); await _assistantRepository.AddNewAssistantAsync(newAssistant); return(CreatedAtAction(nameOfAction, new { id = newAssistant.Id }, newAssistant)); }