Skip to content

alanwei43/Alan.RepositoryGenerateToolkit

Repository files navigation

Alan.RepositoryGenerateToolkit

Repository模式的网站架构生成器

Introduction

Model层的模板使用的是LIQN to SQL. 可以自己修改模板.

Attention

通用Repository 使用了 RulesEngine (主要是IsValidByRuleEngine 方法) 和 Linq Dynamic 两个第三方类库.

配置信息

Core/Configurations.cs

static Configurations()
{
	Current = Configurations.InitViaFile(@"E:\Projects\Alan.RepositoryGenerateToolkit\Alan.RepositoryGenerateToolkit\Template\configuration.json");
}

配置如何获取配置文件.

下面是配置文件描述:

{
"ConnectionString": "your sql server connection",
"Repository": {
    "IRepositoryNamespace": "IRepository的命名空间, 比如: Ysd.BusinessLogicLayer.IRepository",
    "IRepositorySavePath": "IRepository文件保存路径, 比如: E:\\Temporary\\back\\IRepository",
    "RepositoryNamespace": "Repository命名空间, 比如: Ysd.BusinessLogicLayer.Repository",
    "RepositorySavePath": "Repository文件保存路径, 比如: E:\\Temporary\\back\\Repository",
    "GenericIRepositoryTemplatePath": "通用IRepository 模板文件, 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\GenericIRepository.temp",
    "GenericRepositoryTemplatePath": "通用Repository模板文件, 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\GenericRepository.temp",
    "IRepositoryTemplatePath": "IRepository模板文件, 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\IRepository.temp",
    "RepositoryTemplatePath": "Repository模板文件: 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\Repository.temp",
    "GenericIRepositoryName": "通用IRepository类名&文件名, 比如: IGenericRepository",
    "GenericRepositoryName": "通用Repository类名&文件名, 比如: GenericRepository"
},
"Model": {
    "ModelTemplatePath": "Model模板文件路径, 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\Model.temp",
    "ModelSavePath": "Model保存路径, 比如: E:\\Temporary\\back\\Model",
    "ModelNamespace": "Model命名空间, 比如: Ysd.DataAccessLayer.Models",

    "ContextTemplatePath": "Model的Context模板文件路径, 比如: E:\\Projects\\Alan.RepositoryGenerateToolkit\\Alan.RepositoryGenerateToolkit\\Template\\Context.temp",
    "ContextSavePath": "Model的Context文件保存路径, 比如: E:\\Temporary\\back",
    "ContextNamespace": "Model的Context命名空间, 比如: Ysd.DataAccessLayer.Models",
    "ContextName": "Model的Context文件名&类名, 比如: ModelContext",
    "ConnectionName": "Model的Context的构造函数用到的web.config里的连接字符串的名字, 比如: Connection"
}

}

About

Repository模式的网站架构生成器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages