private void AddService()
{
Service service = new Service();
service.ServiceName = newService.ServiceName;
service.RoleId = 8;
service.IsProcedure = false;
service.ShortForm = newService.ServiceName;
service.Maincat = newService.MainCat;
service.Subcat = null;
service.Strength = null;
service.Package = null;
service.Size = null;
service.Note = null;
string baseUrl = "https://localhost:44384";
var httpClient = _clientFactory.CreateClient("ServerAPI");
httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
var response = httpClient.PostAsJsonAsync($"{baseUrl}/api/Service/AddNewService", service);
//need to do stuff here where I need the newly created ServiceId
}
How do I get the Id of the newly inserted record from <response>?