国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

在codesmith中去掉oracle下劃線

2024-08-29 13:34:12
字體:
供稿:網(wǎng)友
    CodeSmith是針對.NET的一款代碼生成工具,同時它的很多自帶模版幾乎都是針對SQL Server構(gòu)架的系統(tǒng),當在在使用Oracle 的時候,由于PL-SQL與T-SQL各個方面的差別,導致許多模版需要自定義,甚至需要重寫許多模版,由于大多數(shù)人在使用Oracle數(shù)據(jù)庫的時候使用下劃線的風格來命名變量,而在.NET開發(fā)中有不提倡使用帶下劃線的方式來命名變量,于是本人決定在CodeSmith的模版中來轉(zhuǎn)換這一風格,在CodeSmith中加入以后模版代碼:
在codesmith中去掉oracle下劃線(圖一)在codesmith中去掉oracle下劃線(圖二)轉(zhuǎn)換代碼

Code highlighting PRodUCed by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--> 1在codesmith中去掉oracle下劃線(圖三)<script runat="template">
 2在codesmith中去掉oracle下劃線(圖三)public string GetFixName(string strVal)
 3在codesmith中去掉oracle下劃線(圖二)在codesmith中去掉oracle下劃線(圖一)在codesmith中去掉oracle下劃線(圖四){
 4在codesmith中去掉oracle下劃線(圖五) 
 5在codesmith中去掉oracle下劃線(圖五) string strReturnVal = "";
 6在codesmith中去掉oracle下劃線(圖五) string[]strVals = strVal.Split('_');
 7在codesmith中去掉oracle下劃線(圖五) foreach(string str in strVals)
 8在codesmith中去掉oracle下劃線(圖六)在codesmith中去掉oracle下劃線(圖七) 在codesmith中去掉oracle下劃線(圖四){
 9在codesmith中去掉oracle下劃線(圖五)  strReturnVal += str.Substring(0,1) + str.Substring(1).ToLower();
10在codesmith中去掉oracle下劃線(圖八) }
11在codesmith中去掉oracle下劃線(圖五) return strReturnVal;
12在codesmith中去掉oracle下劃線(圖九)}
13在codesmith中去掉oracle下劃線(圖三)</script>

    當要使用表名、表字段映射成對象的對象、對象字段屬性進程是,可以通過上述函數(shù)轉(zhuǎn)化原來的名稱,以到達與.NET 編碼規(guī)范統(tǒng)一的效果。


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 台中县| 龙游县| 嵩明县| 家居| 普安县| 成武县| 搜索| 清丰县| 本溪市| 亳州市| 威远县| 广平县| 甘南县| 光山县| 新密市| 辽阳县| 雷州市| 东乡县| 密山市| 宁南县| 禹州市| 阿尔山市| 宜黄县| 陇川县| 长岛县| 绥棱县| 丰县| 阳高县| 临潭县| 新安县| 壤塘县| 三都| 东阳市| 日照市| 万盛区| 三亚市| 曲阜市| 福清市| 密云县| 恩施市| 通辽市|