ConnectionConfig config = new ConnectionConfig()
{
ConnectionStreing="数据库连接字符串",
DBType=SqlSugar.DBType.SqlServer,
ISAutoCloseConnection=true,
InitKeyType=InitKeyType.Attribute
};
SqlSugarClient client = new SqlSugarClient(config);
client.CodeFirst,InitTables(typeof(UserModel));
使用SqlSugar,根据模型创建数据库
最新推荐文章于 2024-06-07 09:45:58 发布