USE [test] GO /****** Object: UserDefinedFunction [dbo].[tf_split_char] Script Date: 2019/7/8 14:39:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[tf_split_char] ( @cstring NVARCHAR(MAX), --被拆分的字符串 ) --分隔符 ) RETURNS…
USE [test]; GO /****** Object: UserDefinedFunction [dbo].[f_findrecycle] Script Date: 2019/7/8 14:37:08 ******/ SET ANSI_NULLS ON; GO SET QUOTED_IDENTIFIER ON; GO ALTER FUNCTION [dbo].[f_findrecycle] ( ), --起点 @nlevel INT --递归的层数 ) RETURNS TABLE AS R…
USE [test] GO /****** Object: StoredProcedure [dbo].[p02_get_group_member] Script Date: 2019/7/8 14:58:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[p02_get_group_member] AS --s2,提取s1中担保圈路径中的成员 BEGIN IF OBJECT_ID(N'dbo…
USE [test] GO /****** Object: StoredProcedure [dbo].[p01_get_group_path] Script Date: 2019/7/8 14:40:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[p01_get_group_path] AS --s1,获取担保圈路径 IF OBJECT_ID(N'dbo.t01_get_group_pa…
USE [test] GO /****** Object: StoredProcedure [dbo].[p03_get_groupno_e2] Script Date: 2019/7/8 15:01:22 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[p03_get_groupno_e2] AS BEGIN --s3,比较各组的成员,对组进行清理,具体见程序的注释 SET STATISTIC…
USE [test] GO /****** Object: StoredProcedure [dbo].[p05_get_group_member_cleared] Script Date: 2019/7/8 15:32:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[p05_get_group_member_cleared] AS --s5,提取未被包含过组的成员,得出结论 BEGIN…
USE [test] GO /****** Object: StoredProcedure [dbo].[p04_get_groupno_cleared] Script Date: 2019/7/8 15:03:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROC [dbo].[p04_get_groupno_cleared] AS --s4,对被包含过的组进行清理,只保留未被包含过的组 BEGIN IF O…
之前有人问过 EF 如何进行实体拆分和表拆分?我记得当时认为不可能,理由忘记了,后来又有人发了一段配置截图,发现原来是可以的,不记录的东西容易忘掉,关于 EF 实体拆分和表拆分,下面是自己的一些整理. 两个概念: 实体拆分:一个实体拆分成多个表,如 Blog 实体,可以拆分成 Blogs 和 BlogDetails 两个表. 表拆分:一个表拆分成多个实体,如 Posts 表,可以拆分成 Post 和 PostDetail 两个实体. 1. 实体拆分 配置代码: public class Blog…