My issue is, when I try to pass a single string to my API I receive it as a null value in the API, but when I try to pass an integer to another controller it works fine, I guess it's a syntax issue. Bellow two controllers as example:
[HttpGet("amostra/get/id/{id}")]
public Amostra GetAmostraId(int id) => _amostra.GetById(id);
[HttpGet("amostra/get/cli/{nomeFantasia}")]
public Dictionary<int, Amostra> getByFantasia(string nF) => _amostra.GetByCliente(nF);
The first one works without an issue, the other one never works, later in the "GetByCliente(nF)" function I check the length of the string and then get the error: "System.NullReferenceException: 'Object reference not set to an instance of an object.'", "nF was null".
Postman example
