AnCode++ (VS2017 插件)

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

<?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>
  <!--3.1 Desc Table Name-->
  <TigerAttribute>Tiger</TigerAttribute>
  <!--3.2 Desc Primary Key and Self growth-->
  <KoalaTrueAttribute>Koala(true)</KoalaTrueAttribute>
  <!--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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值