public async Task <ActionResult> CreatePerson(PersonalData model) { var primaryKey = Guid.NewGuid(); var person = clusterClient.GetVertexGrain <IPerson>(primaryKey, "partition0"); await person.SetPersonalDataAsync(model); await organization.AddPerson(person); return(CreatedAtAction(nameof(GetPerson), new { id = primaryKey }, null)); }
public async Task <ActionResult> CreatePerson(PersonalData model) { var primaryKey = Guid.NewGuid(); var person = grainFactory.GetVertexGrain <IPerson>(primaryKey, "partition0"); model.LastName = organization.ToKeyString(); await person.SetPersonalDataAsync(model); await organization.AddPerson(person); return(CreatedAtAction(nameof(GetPerson), new { id = primaryKey }, null)); }