我想要的是,而不是做
var carsPartial = cars.Select("new(name, year)").ToList();
我想做这个:
var carsPartial = cars.Select<car>("new car(name, year)").ToList<car>();
Run Code Online (Sandbox Code Playgroud)
再次感谢,如果需要请求澄清.
车类:
public class car
{
public string name { get; set; }
public int year { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
什么在汽车:一堆汽车数据的名称和年份有点像数据库.
该方法现在如下所示:
POST person/personId/edit
https://api.example.com/*key*/person/*personId*/edit?FName=Blah
Run Code Online (Sandbox Code Playgroud)
我希望将 personId 中人员的名字更改为 Blah。
如果我需要添加一个人,我会说:
PUT person/create
https://api.example.com/*key*/person/create
Run Code Online (Sandbox Code Playgroud)
它会添加一个具有新 personId 的人。