我正在使用C#代码创建动态SQL Server表,但我需要验证表名.
什么是验证SQL Server表名的正则表达式?
我需要导入多个sql server关系表中的数百万条记录。
TableA(Aid(pk),Name,Color)----return id using scope identity
TableB(Bid,Aid(fk),Name)---Here we need to insert Aid(pk) which we got using scocpe Identity
Run Code Online (Sandbox Code Playgroud)
如何在一个 Insert 语句中使用 dapper 批量插入数百万条记录的集合
我有课
public class ABCImport
{
List<string> SegmentationList;
}
Run Code Online (Sandbox Code Playgroud)
现在我有 ABCImport 列表。
var ABCImportList=New List<ABCImport>();
Run Code Online (Sandbox Code Playgroud)
我需要来自 ABCImportList 列表中的 SegmentationList 的唯一字符串,不带空字符串。假设 ABCImportList 有 50 个 ABCImport 记录,每个 ABCImport 导入都有 SegmentationList,它可以在每个 ABCImport 中重复。所以我需要所有分段列表中的唯一字符串。
这是我到目前为止所拥有的:
ABCImportList
.Where(
x => x.SegmentationList
.Where(s => !string.IsNullOrWhiteSpace(s))
)
.Distinct()
.ToList()
Run Code Online (Sandbox Code Playgroud)