使用C#类生成(我的)sql(ite)create table?

时间:2012-12-15 19:03:08

标签: c# mysql sqlite

我想标记一个类似下面的C#类。是否有任何工具或库使用反射来创建mysql或sqlite create table语句?

class MyTable {
    public int id;
    [FK("User")] //assumes table user, field id. FK("User.id") is just as fine
    public int user;
    [Index]
    public int flags;
    [unique]
    public string email;
    [unique, nullable]
    public string something_else;
}

0 个答案:

没有答案