mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-05 07:50:52 +08:00
update
16
性能.md
16
性能.md
@@ -35,6 +35,7 @@ FreeSql实现了强大功能的同时,性能没有受到影响,项目中使
|
||||
> 测试结果,是在相同操作系统下进行的,并且都有预热
|
||||
|
||||
```csharp
|
||||
//测试实体类
|
||||
public class TestInsert10c
|
||||
{
|
||||
[Column(MapType = typeof(string))]
|
||||
@@ -52,6 +53,21 @@ public class TestInsert10c
|
||||
public string PassWord2 { get; set; }
|
||||
public DateTime CreateTime2 { get; set; }
|
||||
}
|
||||
|
||||
//生成测试数据
|
||||
var testCount = 10000;
|
||||
var t10cs = new List<TestInsert10c>();
|
||||
for (var a = 0; a < testCount; a++)
|
||||
{
|
||||
var item = new TestInsert10c();
|
||||
for (var b = 0; b <= 2; b++)
|
||||
{
|
||||
orm.SetEntityValueWithPropertyName(typeof(TestInsert10c), item, "UserName" + b, Guid.NewGuid().ToString("N"));
|
||||
orm.SetEntityValueWithPropertyName(typeof(TestInsert10c), item, "PassWord" + b, Guid.NewGuid().ToString("N"));
|
||||
orm.SetEntityValueWithPropertyName(typeof(TestInsert10c), item, "CreateTime" + b, DateTime.Now);
|
||||
}
|
||||
t10cs.Add(item);
|
||||
}
|
||||
```
|
||||
|
||||
# 查询测试
|
||||
|
||||
Reference in New Issue
Block a user