標籤:tcp網路通訊
NetworkComms網路通訊架構配套CodeSmith模板使用簡介
NetworkComms網路通訊程式開發過程中,與資料庫的互動部分,很多代碼我們採用CodeSmith模板來產生。
此套CodeSmith模板目前只支援sql server 資料庫
模板: 【模板下載】分享我所使用的資料庫架構
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281139293143949.jpg" style="border:0px;" />
我們以Sql server資料庫為例 簡單的看一下如何使用CodeSmith模板產生相關檔案
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281135158145595.jpg" style="border:0px;" />
首先雙擊開啟模板檔案
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281114311116690.jpg" style="border:0px;width:1091px;" />
第二步:開啟屬性視窗
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281116368616539.jpg" style="border:0px;width:1091px;" />
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281119372836720.jpg" style="border:0px;width:1091px;" />
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281131112051490.jpg" style="border:0px;" />
資料庫配置完成後 ,選擇相應的表
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281132242992893.jpg" style="border:0px;" />
650) this.width=650;" src="http://images.cnitblog.com/blog/586310/201502/281133173612281.jpg" style="border:0px;" />
產生的程式碼如下:
650) this.width=650;" id="code_img_closed_df6c0f35-f571-4f02-a7be-f2c944fc8046" class="code_img_closed" src="http://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif" style="border:0px;vertical-align:middle;padding-right:5px;" /> View Code
NetworkComms網路通訊架構配套CodeSmith模板使用簡介