mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 04:37:58 +08:00
Synchronization code
This commit is contained in:
parent
8817cce667
commit
9ddfd4eedd
@ -4,6 +4,18 @@
|
|||||||
{
|
{
|
||||||
public override ISugarQueryable<T> With(string withString)
|
public override ISugarQueryable<T> With(string withString)
|
||||||
{
|
{
|
||||||
|
if (withString == null)
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
if (UtilMethods.StringCheckFirstAndLast(withString.TrimStart(' ').TrimEnd(' '), "/*", "*/"))
|
||||||
|
{
|
||||||
|
QueryBuilder.TableWithString = withString;
|
||||||
|
}
|
||||||
|
else if (UtilMethods.StringCheckFirstAndLast(withString.TrimStart(' ').TrimEnd(' ').ToLower(), "force", ")"))
|
||||||
|
{
|
||||||
|
QueryBuilder.TableWithString = withString;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class UtilMethods
|
public class UtilMethods
|
||||||
{
|
{
|
||||||
|
public static bool StringCheckFirstAndLast(string withString, string first, string last)
|
||||||
|
{
|
||||||
|
return withString.StartsWith(first) && withString.EndsWith(last);
|
||||||
|
}
|
||||||
public static bool HasInterface(Type targetType, Type interfaceType)
|
public static bool HasInterface(Type targetType, Type interfaceType)
|
||||||
{
|
{
|
||||||
if (targetType == null || interfaceType == null || !interfaceType.IsInterface)
|
if (targetType == null || interfaceType == null || !interfaceType.IsInterface)
|
||||||
|
Loading…
Reference in New Issue
Block a user