public async Task <IActionResult> CreatePerson(CreatePerson request) { var person = request.ToPerson(); ctx.Persons.Add(person); await ctx.SaveChangesAsync(); return(Ok(person.Id)); }
public async Task <ActionResult <Person> > Create(CreatePerson request) { var person = await mediator.Send(request); return(person); }