I'm writing web service in asp.net mvc and still having the same error connected with the code below:
public ActionResult Edit(int C)
{
var customers = _ourCustomerRespository.GetCustomers();
var std = customers.Where(s => s.CustomerID == C).FirstOrDefault();
return View(std);
}
[System.Web.Http.HttpPost]
public ActionResult Edit(Customer C)
{
return RedirectToAction("Index");
}
and when i try use my service i have error message
The current request for action 'Edit' on controller type 'DefaultController' is ambiguous between the following action methods: System.Web.Mvc.ActionResult Edit(Int32) on type WebApplication2.Controllers.DefaultController System.Web.Mvc.ActionResult Edit(WebApplication2.Models.Customer) on type WebApplication2.Controllers.DefaultController
Can anybody help me with solving that?