I have a GET method that requires 2 parameters, my implementation is below. But I am getting an error. Is it the right way? At first I thought I can only pass one param, after I build the code I did not see an error, but when I consume the method in fiddler I am getting an error.
Suggestions please.
public class ProfessionalController : ApiController { public IProfessionalRepository professionalRepository; public ListProfessionalController(IProfessionalRepository repo) { professionalRepository = repo; } [HttpGet] public List<Professional> GetProfessionals(int companyId, string professionalName) { return professionalRepository.GetProfessionals(companyId, professionalName); } }