mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
DbFirst Description BUG
This commit is contained in:
@@ -18,26 +18,26 @@ namespace OrmTest
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/***Unit Test***/
|
||||
new Field(1).Init();
|
||||
new Where(1).Init();
|
||||
new Method(1).Init();
|
||||
new JoinQuery(1).Init();
|
||||
new SingleQuery(1).Init();
|
||||
new SelectQuery(1).Init();
|
||||
new AutoClose(1).Init();
|
||||
new Insert(1).Init();
|
||||
new Delete(1).Init();
|
||||
new Update(1).Init();
|
||||
new Mapping(1).Init();
|
||||
new DataTest(1).Init();
|
||||
/***Performance Test***/
|
||||
new SqlSugarPerformance(100).Select();
|
||||
//new Field(1).Init();
|
||||
//new Where(1).Init();
|
||||
//new Method(1).Init();
|
||||
//new JoinQuery(1).Init();
|
||||
//new SingleQuery(1).Init();
|
||||
//new SelectQuery(1).Init();
|
||||
//new AutoClose(1).Init();
|
||||
//new Insert(1).Init();
|
||||
//new Delete(1).Init();
|
||||
//new Update(1).Init();
|
||||
//new Mapping(1).Init();
|
||||
//new DataTest(1).Init();
|
||||
///***Performance Test***/
|
||||
//new SqlSugarPerformance(100).Select();
|
||||
|
||||
/***Demo***/
|
||||
OrmTest.Demo.Query.Init();
|
||||
OrmTest.Demo.Insert.Init();
|
||||
OrmTest.Demo.Delete.Init();
|
||||
OrmTest.Demo.Update.Init();
|
||||
///***Demo***/
|
||||
//OrmTest.Demo.Query.Init();
|
||||
//OrmTest.Demo.Insert.Init();
|
||||
//OrmTest.Demo.Delete.Init();
|
||||
//OrmTest.Demo.Update.Init();
|
||||
OrmTest.Demo.DbFirst.Init();
|
||||
OrmTest.Demo.JoinSql.Init();
|
||||
OrmTest.Demo.Filter.Init();
|
||||
|
@@ -139,6 +139,9 @@ namespace SqlSugar
|
||||
{
|
||||
return "other";
|
||||
}
|
||||
else if (dbTypeName == "xml") {
|
||||
return "string";
|
||||
}
|
||||
else if (propertyTypes.First().Value == CSharpDataType.byteArray)
|
||||
{
|
||||
return "byte[]";
|
||||
|
@@ -40,7 +40,7 @@ namespace SqlSugar
|
||||
public void Init()
|
||||
{
|
||||
this.TableInfoList =this.Context.RewritableMethods.TranslateCopy(this.Context.DbMaintenance.GetTableInfoList());
|
||||
var viewList = this.Context.DbMaintenance.GetViewInfoList();
|
||||
var viewList = this.Context.RewritableMethods.TranslateCopy(this.Context.DbMaintenance.GetViewInfoList());
|
||||
if (viewList.IsValuable())
|
||||
{
|
||||
this.TableInfoList.AddRange(viewList);
|
||||
@@ -177,6 +177,7 @@ namespace SqlSugar
|
||||
}
|
||||
classText = classText.Replace(DbFirstTemplate.KeyConstructor, ConstructorText);
|
||||
classText = classText.Replace(DbFirstTemplate.KeyPropertyName, null);
|
||||
result.Remove(className);
|
||||
result.Add(className, classText);
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this._Fields.IsNullOrEmpty())
|
||||
{
|
||||
this._Fields = Regex.Match(this.sql.ToString(), @"select(.*?)from", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||
this._Fields = Regex.Match(this.sql.ObjToString().Replace("\n",string.Empty).Replace("\r", string.Empty).Trim(), @"select(.*?)from", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||
if (this._Fields.IsNullOrEmpty())
|
||||
{
|
||||
this._Fields = "*";
|
||||
|
@@ -253,7 +253,8 @@ namespace SqlSugar
|
||||
{ "Equals","Equals"},
|
||||
{ "ToLower","ToLower"},
|
||||
{ "ToUpper","ToUpper"},
|
||||
{ "Substring","Substring"}
|
||||
{ "Substring","Substring"},
|
||||
{ "Trim","Trim"}
|
||||
};
|
||||
|
||||
private void CheckMethod(MethodCallExpression expression)
|
||||
|
@@ -58,7 +58,7 @@ namespace SqlSugar
|
||||
{
|
||||
get
|
||||
{
|
||||
return @"SELECT s.Name,tbp.value as Description
|
||||
return @"SELECT s.Name,Convert(varchar(max),tbp.value) as Description
|
||||
FROM sysobjects s
|
||||
LEFT JOIN sys.extended_properties as tbp ON s.id=tbp.major_id and tbp.minor_id=0 WHERE s.xtype IN('U')";
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace SqlSugar
|
||||
{
|
||||
get
|
||||
{
|
||||
return @"SELECT s.Name,tbp.value as Description
|
||||
return @"SELECT s.Name,Convert(varchar(max),tbp.value) as Description
|
||||
FROM sysobjects s
|
||||
LEFT JOIN sys.extended_properties as tbp ON s.id=tbp.major_id and tbp.minor_id=0 WHERE s.xtype IN('V')";
|
||||
}
|
||||
|
Reference in New Issue
Block a user