AnCode + + is a code generator, which is suitable for the animal.orm framework, and can also customize the internal structure and data type for your own orm framework.

Generate Model 

Aconfig.xml

<? The XML version = "1.0" encoding = "utf-8"? > <AnimalConfig> <! --1.Model Suffix Name--> <EntitySuffixName>Entity</EntitySuffixName> <! --2.Model NameSpance--> <EntityNameSpance>AnCodeDemo</EntityNameSpance> <! --3.Show Attribute(Tiger, Koala, Cat) 1 Show 0 Hide--> <UseAttribute>1</UseAttribute> <! -- Desc Table Name--> < tigerAttribute >Tiger</ tigerAttribute > <! --3.2 Desc Primary Key and Self growth-- db0 < koalatrueAttribute db1 Koala(true)</ koalatrueAttribute db2 <! --3.3 Desc Primary Key--> < koalaAttribute >Koala</ koalaAttribute > <! --3.4 Desc Column--> <CatAttribute>Cat</CatAttribute> <! --4.Using Attribute NameSpance--> <AttributeNameSpance>using Animal.ORM.Model; </AttributeNameSpance> <! --5.Using The Third NameSpance--> <UsingThirdNameSpance/> <UsingThirdNameSpance2/> <UsingThirdNameSpance3/> <UsingThirdNameSpance4/> <UsingThirdNameSpance5/> <! --6.System Base Type Config,if not exists the type is string--> <BaseTypeList> <AnimalBaseType> <BaseTypeName>long</BaseTypeName> <BaseTypeVsDbColumnTypeNames>bigint</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>int</BaseTypeName> <BaseTypeVsDbColumnTypeNames>int,bit,year</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>string</BaseTypeName> <BaseTypeVsDbColumnTypeNames>char,text,json,xml</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>DateTime</BaseTypeName> <BaseTypeVsDbColumnTypeNames>datetime,time,date,timestamp</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>double</BaseTypeName> <BaseTypeVsDbColumnTypeNames>real,float,double,number,numeric</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>decimal</BaseTypeName> <BaseTypeVsDbColumnTypeNames>decimal,money</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> <AnimalBaseType> <BaseTypeName>Byte[]</BaseTypeName> <BaseTypeVsDbColumnTypeNames>binary,blob,image</BaseTypeVsDbColumnTypeNames> </AnimalBaseType> </BaseTypeList> <! --7.System Base Nullable Type Config, eg int? ,DateTime? --> <BaseNullableTypeArray>int,DateTime,double,decimal,long,bool</BaseNullableTypeArray> </AnimalConfig>

Code

Demo

https://download.csdn.net/download/niuzai520/15741899