我在asp.net mvc的編寫web服務,仍然有下面的代碼連接相同的錯誤:編輯視圖在asp.net mvc的 - 控制器錯誤
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");
}
,當我嘗試使用我的服務我有錯誤消息
行動上控制器類型 「DefaultController」「編輯」當前請求是採用以下的操作方法之間曖昧: System.Web.Mvc.ActionResult編輯(Int32)已在類型 WebApplication2。 Controllers.DefaultController System.Web.Mvc.ActionResult編輯在 型WebApplication2.Controllers.DefaultController(WebApplication2.Models.Customer)
任何人可以幫助我解決嗎?