locked
How multiple Get function could be there in a web api controller RRS feed

  • Question

  • User264732274 posted

    just see the scenario

         public class CustomerController : ApiController
         {
             public IEnumerable<Customer> GetCustomersByID(int id)
             {
    
             }
    
             public IEnumerable<Customer> GetCustomersByName(string name)
             {
    
             }
    
             public IEnumerable<Customer> GetCustomersByEmail(string strEmail)
             {
    
             }
         }

    now tell me what i need to do as a result end user can call three get action by their name. how to handle this situation. thanks

    Thursday, August 4, 2016 3:39 PM

Answers