一、简介


1、本节主要说明入参的几种接收方式

 

二、不限定模式


1、定义一个id入参与一个model入参。

2、get\post分别查看访问效果。

 

api代码

 1     public class OneController : Controller
 2     {
 3         public string GetString(string id, Model model)
 4         {
 5             return string.Format("getid:{0},model(id:{1},name:{2})", id, model.ID, model.Name);
 6         }
 7     }
 8     public class Model
 9     {
10         public string ID { get; set; }
11         public string Name { get; set; }
12     }
View Code

相关文章: