Browse Source

Synchronization code

pull/40/head
sunkaixuan 1 year ago
parent
commit
d0ceee54ad
  1. 7
      Src/Asp.Net/SqlSugar.Access/Access/SqlBuilder/AccessExpressionContext.cs

7
Src/Asp.Net/SqlSugar.Access/Access/SqlBuilder/AccessExpressionContext.cs

@ -23,6 +23,13 @@ namespace SqlSugar.Access
public override string ToDate(MethodCallExpressionModel model)
{
var parameter = model.Args[0];
if (parameter.MemberName?.ToString()?.Contains(":")==true
&& parameter.MemberName?.ToString()?.Contains("-") == true
&&parameter.MemberName?.ToString()?.StartsWith("'") == true)
{
parameter.MemberName ="'"+ parameter.MemberName.ToString()
.ToString().TrimEnd('\'').TrimStart('\'').ObjToDate().ToString("yyyy-MM-dd HH:mm:ss")+"'";
}
return string.Format(" CDate({0}) ", parameter.MemberName);
}
public override string ToBool(MethodCallExpressionModel model)

Loading…
Cancel
Save