From d6853e93fec47cfa83de2738f7691a6083981df1 Mon Sep 17 00:00:00 2001
From: 28810 <28810@YEXIANGQIN>
Date: Sun, 16 Aug 2020 15:38:00 +0800
Subject: [PATCH] arrange code
---
FreeSql.DbContext/FreeSql.DbContext.xml | 9 --
FreeSql/Extensions/FreeSqlGlobalExtensions.cs | 5 +-
FreeSql/FreeSql.xml | 108 ++++++++++++++++++
3 files changed, 112 insertions(+), 10 deletions(-)
diff --git a/FreeSql.DbContext/FreeSql.DbContext.xml b/FreeSql.DbContext/FreeSql.DbContext.xml
index 2acb6679..c46aa1e3 100644
--- a/FreeSql.DbContext/FreeSql.DbContext.xml
+++ b/FreeSql.DbContext/FreeSql.DbContext.xml
@@ -527,14 +527,5 @@
-
-
- 批量注入 Repository,可以参考代码自行调整
-
-
-
-
-
-
diff --git a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
index 8870e1c3..7ce20615 100644
--- a/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
+++ b/FreeSql/Extensions/FreeSqlGlobalExtensions.cs
@@ -17,6 +17,7 @@ using System.Threading;
public static partial class FreeSqlGlobalExtensions
{
+ #region Type 对象扩展方法
static Lazy> _dicIsNumberType = new Lazy>(() => new Dictionary
{
[typeof(sbyte)] = true,
@@ -167,6 +168,7 @@ public static partial class FreeSqlGlobalExtensions
}
return dict;
});
+ #endregion
///
/// 测量两个经纬度的距离,返回单位:米
@@ -183,6 +185,7 @@ public static partial class FreeSqlGlobalExtensions
return 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin((radLat1 - radLat2) / 2), 2) + Math.Cos(radLat1) * Math.Cos(radLat2) * Math.Pow(Math.Sin((radLng1 - radLng2) / 2), 2))) * 6378137;
}
+ #region Enum 对象扩展方法
static ConcurrentDictionary _dicGetFields = new ConcurrentDictionary();
public static object GetEnum(this IDataReader dr, int index)
{
@@ -195,7 +198,6 @@ public static partial class FreeSqlGlobalExtensions
}
return null;
}
-
public static string ToDescriptionOrString(this Enum item)
{
string name = item.ToString();
@@ -218,6 +220,7 @@ public static partial class FreeSqlGlobalExtensions
}
return ret;
}
+ #endregion
///
/// 将 IEnumable<T> 转成 ISelect<T>,以便使用 FreeSql 的查询功能。此方法用于 Lambda 表达式中,快速进行集合导航的查询。
diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml
index 2bff73de..07cb2cc2 100644
--- a/FreeSql/FreeSql.xml
+++ b/FreeSql/FreeSql.xml
@@ -3961,6 +3961,60 @@
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
插入数据
@@ -4062,6 +4116,60 @@
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
+
+
+ 多表查询
+
+
+
使用 and 拼接两个 lambda 表达式