Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
48630e4b6e
  1. BIN
      .vs/SqlSugar/v14/.suo
  2. 2
      OrmTest/Program.cs
  3. BIN
      OrmTest/bin/Debug/OrmTest.exe
  4. BIN
      OrmTest/bin/Debug/OrmTest.pdb
  5. BIN
      OrmTest/bin/Debug/SqlSugar.dll
  6. BIN
      OrmTest/bin/Debug/SqlSugar.pdb
  7. BIN
      OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache
  8. BIN
      OrmTest/obj/Debug/OrmTest.exe
  9. BIN
      OrmTest/obj/Debug/OrmTest.pdb
  10. 2
      SqlSugar/Abstract/LambdaExpressionsProvider/ResolveExpress/Expressions.cs
  11. 6
      SqlSugar/Abstract/LambdaExpressionsProvider/ResolveExpress/Main.cs
  12. 4
      SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  13. 6
      SqlSugar/ExpressionsToSql/Common/ResolveExpressType.cs
  14. 2
      SqlSugar/ExpressionsToSql/ExpressionContext.cs
  15. 2
      SqlSugar/ExpressionsToSql/ResolveItems/MemberNewExpressionResolve.cs
  16. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  17. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  18. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  19. BIN
      SqlSugar/obj/Debug/SqlSugar.pdb

BIN
.vs/SqlSugar/v14/.suo

Binary file not shown.

2
OrmTest/Program.cs

@ -25,7 +25,7 @@ namespace OrmTest
string x = "1";
Expression<Func<Student, bool>> exp = it => it.Name==new Program().x;
// Expression<Func<Student, object>> exp = it => it.Name;
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.Single);
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.WhereSingle);
// var x = expContext.GetFiledName();
var xx = expContext.ToSqlString();

BIN
OrmTest/bin/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/bin/Debug/OrmTest.pdb

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
OrmTest/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.csprojResolveAssemblyReference.cache

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.exe

Binary file not shown.

BIN
OrmTest/obj/Debug/OrmTest.pdb

Binary file not shown.

2
SqlSugar/Abstract/LambdaExpressionsProvider/ResolveExpress/Expressions.cs

@ -86,7 +86,7 @@ namespace SqlSugar
}
else
{
if (Type == ResolveExpressType.Multiple)
if (Type == ResolveExpressType.WhereMultiple)
{
type = MemberType.Key;
var dbName = exp.ToString();

6
SqlSugar/Abstract/LambdaExpressionsProvider/ResolveExpress/Main.cs

@ -39,7 +39,7 @@ namespace SqlSugar
}
public string SqlWhere = null;
public ResolveExpressType Type = ResolveExpressType.Single;
public ResolveExpressType Type = ResolveExpressType.WhereSingle;
public List<SqlParameter> Paras = new List<SqlParameter>();
private int SameIndex = 1;
private SqlSugarClient DB;
@ -272,7 +272,7 @@ namespace SqlSugar
string oldLeft = left;
left = left + SameIndex;
SameIndex++;
if (Type != ResolveExpressType.Single)
if (Type != ResolveExpressType.WhereSingle)
{
left = left.Replace(".", "_");
}
@ -298,7 +298,7 @@ namespace SqlSugar
string oldRight = right;
right = right + SameIndex;
SameIndex++;
if (Type != ResolveExpressType.Single)
if (Type != ResolveExpressType.WhereSingle)
{
right = right.Replace(".", "_");
}

4
SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -28,7 +28,7 @@ namespace SqlSugar
public virtual ISugarQueryable<T> Where(Expression<Func<T, bool>> expression)
{
base.Where<T>(expression, ResolveExpressType.Single, this.Context);
base.Where<T>(expression, ResolveExpressType.WhereSingle, this.Context);
return this;
}
@ -299,7 +299,7 @@ namespace SqlSugar
var sqlBuilder = this.Context.SqlBuilder;
var items = sqlBuilder.LambadaQueryBuilder;
items.WhereIndex = items.WhereIndex + 100;
items.ResolveType = ResolveExpressType.Multiple;
items.ResolveType = ResolveExpressType.WhereMultiple;
ResolveExpress re = new ResolveExpress();
re.Context = this.Context;
var exLeftArray = re.GetLeftArray(expression);

6
SqlSugar/ExpressionsToSql/Common/ResolveExpressType.cs

@ -7,7 +7,9 @@ namespace SqlSugar
{
public enum ResolveExpressType
{
Single = 0,
Multiple = 1,
WhereSingle = 0,
WhereMultiple = 1,
SelectSingle=2,
SelectMultiple=3
}
}

2
SqlSugar/ExpressionsToSql/ExpressionContext.cs

@ -27,7 +27,7 @@ namespace SqlSugar
{
get
{
return this.Type == ResolveExpressType.Single;
return this.Type == ResolveExpressType.WhereSingle;
}
}
public List<SugarParameter> Parameters

2
SqlSugar/ExpressionsToSql/ResolveItems/MemberNewExpressionResolve.cs

@ -19,7 +19,7 @@ namespace SqlSugar
var isProperty = expression.Member is System.Reflection.PropertyInfo;
if (isField)
{
value = ExpressionTool.GetFiledValue(expression.Expression as MemberExpression);
value = ExpressionTool.GetFiledValue(expression);
}
else if (isProperty)
{

BIN
SqlSugar/bin/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/bin/Debug/SqlSugar.pdb

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.dll

Binary file not shown.

BIN
SqlSugar/obj/Debug/SqlSugar.pdb

Binary file not shown.
Loading…
Cancel
Save