在文本编辑器里将对象的字段属性去除\n\r后:
var data = "public System.Guid AdvertCompanyId { get; set; }public string AdvertCompanyName { get; set; }"
.split(" { get; set; }");
var list = [];
var str1 = "";
var str2 = "";
for (var i = 0; i < data.length; i++) {
data[i] = data[i].substr(data[i].lastIndexOf(" ")+1, (data[i].length - data[i].lastIndexOf(" ")));
if (data[i]) {
list.push(data[i]);
str1+="\""+data[i]+"\",\n"
str2+="upd."+data[i]+"=model."+data[i]+";\n"
}
}
console.log(str1);
console.log(str2);
console.log(list);