1 Star 0 Fork 122

mastersoft/DevelopAssistant

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
CreateModel.cs 1.41 KB
Copy Edit Raw Blame History
wxd_tony1984 authored 2016-05-30 22:20 +08:00 . 一些修改
using System;
using System.Collections.Generic;
using System.Text;
using NORM.Common;
using DevelopAssistant.Service.TemplatingEngine;
using System.Windows.Forms;
using System.Data;
namespace DevelopAssistant.Service
{
public class CreateModel
{
public static string CreateNormEntity(TextTemplatingEngine host, string name,out string message)
{
StringPlus sp = new StringPlus();
using (var db = Utility.GetAdohelper(host.ConnectionString,host.ProviderName))
{
string code = string.Empty;
NORM.SQLObject.Generator.BuildEntity(db, name, host.NameSpace, host.SpaceName, out code);
sp.Append(code);
}
message = "" + name + "-Model 生成完成";
return sp.Value;
}
public static string CreateNormModel(TextTemplatingEngine host, string name, out string message)
{
StringPlus sp = new StringPlus();
//using (var db = Utility.GetAdohelper(dataBaseServer))
//{
// string code = string.Empty;
// NORM.SQLObject.Generator.BuildModel(db, name, "DevelopAssistant.Test", out code);
// sp.Append(code);
//}
sp.Append(Creater.CreateCode(host, "Model", "t4_model.tt", "F:\\CODE\\MODEL\\", "", out message));
return sp.Value;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/mastersoft/DevelopAssistant.git
git@gitee.com:mastersoft/DevelopAssistant.git
mastersoft
DevelopAssistant
DevelopAssistant
master

Search