public HumanModel Post([FromBody] NewHumanModel value) { var result = new HumanModel(value.Name); _humans.Add(result); return(result); }
public HumanModel Put(Guid id, [FromBody] NewHumanModel value) { var model = _humans.FirstOrDefault(x => x.Id == id); if (model == null) { throw new Exception("Id not found"); } model.Name = value.Name; return(model); }