mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-26 05:32:53 +08:00
-
This commit is contained in:
@@ -11,19 +11,19 @@ namespace OrmTest.Demo
|
||||
public static void Init()
|
||||
{
|
||||
var db = GetInstance();
|
||||
//Create all class
|
||||
db.DbFirst.CreateClassFile("c:\\Demo\\1");
|
||||
////Create all class
|
||||
//db.DbFirst.CreateClassFile("c:\\Demo\\1");
|
||||
|
||||
//Create student calsss
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\Demo\\2");
|
||||
//Where(array)
|
||||
////Create student calsss
|
||||
//db.DbFirst.Where("Student").CreateClassFile("c:\\Demo\\2");
|
||||
////Where(array)
|
||||
|
||||
//Mapping name
|
||||
db.MappingTables.Add("ClassStudent", "Student");
|
||||
db.DbFirst.Where("Student").CreateClassFile("c:\\Demo\\3");
|
||||
////Mapping name
|
||||
//db.MappingTables.Add("ClassStudent", "Student");
|
||||
//db.DbFirst.Where("Student").CreateClassFile("c:\\Demo\\3");
|
||||
|
||||
//Remove mapping
|
||||
db.MappingTables.Clear();
|
||||
////Remove mapping
|
||||
//db.MappingTables.Clear();
|
||||
|
||||
//Create class with default value
|
||||
db.DbFirst.IsCreateDefaultValue().CreateClassFile("c:\\Demo\\4");
|
||||
|
||||
@@ -250,7 +250,6 @@ namespace SqlSugar
|
||||
{
|
||||
result += "?";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
private string GetPropertyTypeConvert(DbColumnInfo item)
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (string.IsNullOrEmpty(tableName)) return new List<DbColumnInfo>();
|
||||
string key = "DbMaintenanceProvider.GetColumnInfosByTableName." + tableName.ToLower();
|
||||
return GetListOrCache<DbColumnInfo>(key, this.GetColumnInfosByTableNameSql);
|
||||
return GetListOrCache<DbColumnInfo>(key,string.Format(this.GetColumnInfosByTableNameSql,tableName));
|
||||
}
|
||||
|
||||
public virtual List<string> GetIsIdentities(string tableName)
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace SqlSugar
|
||||
WHERE xtype IN('u',
|
||||
'v') )
|
||||
AND (systypes.name <> 'sysname')
|
||||
AND sysobjects.name='student'
|
||||
AND sysobjects.name='{0}'
|
||||
AND systypes.name<>'geometry'
|
||||
AND systypes.name<>'geography'
|
||||
ORDER BY syscolumns.colid";
|
||||
|
||||
Reference in New Issue
Block a user