mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Expression BUG
This commit is contained in:
parent
ebf36b9c91
commit
f72eca09df
@ -14,7 +14,7 @@ namespace OrmTest.Demo
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
var db = GetMasterSlaveInstance();
|
||||
var list = db.Insertable(new Student() { Name="aa" }).ExecuteCommand(); // ConnectionString2 or ConnectionString3
|
||||
|
@ -16,7 +16,7 @@ namespace OrmTest.Demo
|
||||
};
|
||||
db.Insertable(a).AS("student").ExecuteCommand();
|
||||
|
||||
var list = db.Queryable<AttributeTest>().AS("student").Select(it => new AttributeTest() { Aid = it.Aid + 1 }).ToList();
|
||||
var list = db.Queryable<AttributeTest>().AS("student").Select(it => new AttributeTest() { Aid = it.Aid + 1,CreateTime=DateTime.Now,Name=it.Name }).ToList();
|
||||
}
|
||||
|
||||
public class AttributeTest
|
||||
@ -25,7 +25,7 @@ namespace OrmTest.Demo
|
||||
public int Aid { get; set; }
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
public int CreateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (!ReaderKeys.Contains(mappInfo.DbColumnName))
|
||||
{
|
||||
fileName = ReaderKeys.Single(it => it.Equals(mappInfo.DbColumnName, StringComparison.CurrentCultureIgnoreCase));
|
||||
fileName = ReaderKeys.First(it => it.Equals(mappInfo.DbColumnName, StringComparison.CurrentCultureIgnoreCase)|| it.Equals(mappInfo.PropertyName, StringComparison.CurrentCultureIgnoreCase));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -122,6 +122,10 @@ namespace SqlSugar
|
||||
ExpressionContext copyContext = (ExpressionContext)Activator.CreateInstance(this.GetType(), true);
|
||||
copyContext.Index = this.Index;
|
||||
copyContext.ParameterIndex = this.ParameterIndex;
|
||||
copyContext.MappingColumns = this.MappingColumns;
|
||||
copyContext.MappingTables = this.MappingTables;
|
||||
copyContext.IgnoreComumnList = this.IgnoreComumnList;
|
||||
copyContext.SqlFuncServices = this.SqlFuncServices;
|
||||
return copyContext;
|
||||
}
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user