Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
5d7e266ec7
  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. 4
      SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs
  11. 33
      SqlSugar/ExpressionsToSql/ResolveItems/MemberInitExpressionResolve.cs
  12. 1
      SqlSugar/SqlSugar.csproj
  13. BIN
      SqlSugar/bin/Debug/SqlSugar.dll
  14. BIN
      SqlSugar/bin/Debug/SqlSugar.pdb
  15. BIN
      SqlSugar/obj/Debug/SqlSugar.dll
  16. BIN
      SqlSugar/obj/Debug/SqlSugar.pdb

BIN
.vs/SqlSugar/v14/.suo

Binary file not shown.

2
OrmTest/Program.cs

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

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.

4
SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

@ -83,6 +83,10 @@ namespace SqlSugar
{
return new UnaryExpressionResolve(parameter);
}
else if (exp is MemberInitExpression)
{
return new MemberInitExpressionResolve(parameter);
}
else if (exp != null && exp.NodeType.IsIn(ExpressionType.New, ExpressionType.NewArrayBounds, ExpressionType.NewArrayInit))
{
Check.ThrowNotSupportedException("ExpressionType.New、ExpressionType.NewArrayBounds and ExpressionType.NewArrayInit");

33
SqlSugar/ExpressionsToSql/ResolveItems/MemberInitExpressionResolve.cs

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
public class MemberInitExpressionResolve : BaseResolve
{
public MemberInitExpressionResolve(ExpressionParameter parameter) : base(parameter)
{
var expression = base.Expression as MemberInitExpression;
switch (parameter.Context.Type)
{
case ResolveExpressType.WhereSingle:
break;
case ResolveExpressType.WhereMultiple:
break;
case ResolveExpressType.SelectSingle:
break;
case ResolveExpressType.SelectMultiple:
break;
case ResolveExpressType.FieldSingle:
break;
case ResolveExpressType.FieldMultiple:
break;
default:
break;
}
}
}
}

1
SqlSugar/SqlSugar.csproj

@ -100,6 +100,7 @@
<Compile Include="ExpressionsToSql\Common\BinaryExpressionInfo.cs" />
<Compile Include="ExpressionsToSql\Common\ExpressionErrorMessage.cs" />
<Compile Include="ExpressionsToSql\ResolveItems\MemberConstExpressionResolve.cs" />
<Compile Include="ExpressionsToSql\ResolveItems\MemberInitExpressionResolve.cs" />
<Compile Include="ExpressionsToSql\ResolveItems\MemberNewExpressionResolve.cs" />
<Compile Include="ExpressionsToSql\ResolveItems\MemberNoExpressionResolve.cs" />
<Compile Include="ExpressionsToSql\Common\SugarParameter.cs" />

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