1
A
답변
2
생각 .... 두 번째 예제 MVC 프레임 워크에서
[HttpPut]
public HttpResponseMessage MyPutAction(myModelType MyModel)
{
....
// here is some code that will update the record and return it as part of HttpResponseMessage
....
또는
public HttpResponseMessage Put(myModelType MyModel) ....
이가 [넣어] 메소드 이름에 기반 것을 알고있다. 그래서 당신은
또는
public HttpResponseMessage PutMyModel(myModelType MyModel) ....
바보 소리 그러나 다만 위와 같은 작품 [HttpPut]로 장식 할 필요가 없습니다. 다시 말하지만, MVC 프레임 워크는 메서드 이름에 기반하여 [Put]이 "Put"으로 시작하기 때문에이를 알고 있습니다.