【C#】数据库实体对象取出字段名列表js浏览器控制台执行

在文本编辑器里将对象的字段属性去除\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);

【C#】数据库实体对象取出字段名列表js浏览器控制台执行

上一篇:MySQL8.0-INFORMATION_SCHEMA增强


下一篇:ODBC是什么?