Can somebody explain me one thing.
I have two methods in my controller :
public ActionResult AddPredefinedTicket(int customerId) {...}
and
public ActionResult AddPredefinedTicket(int customerId, TicketTypes type, string additionalJsonParameters) {...} (here TicketTypes is enum)
I'm tring to make a call with using URL like
http://.../Ticket/AddPredefinedTicket?customerId=1082
For some reason i got an exception :
The current request for action 'AddPredefinedTicket' on controller type 'TicketController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult AddPredefinedTicket(Int32) on type CallCenter.CustomerService.Controllers.TicketController
System.Web.Mvc.ActionResult AddPredefinedTicket(Int32, CallCenter.CustomerService.Data.Models.TicketTypes, System.String) on type CallCenter.CustomerService.Controllers.TicketController
But, i don't understand why MVC think that the request is ambiguous. As you can see from my URL call, i'm not passing neither 'type' or 'additionalJsonParameters' parameters. I understand, that additionalJsonParameters is string, so it can be null.
But the action also has "type" parameter, that is enum and can't be null.
In my oppinion, MVC should use first action, but it don't.
Can you explain why ?