markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocPage.cs @ 731c84b8
이력 | 보기 | 이력해설 | 다운로드 (1.13 KB)
1 |
using NUnit.Framework; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
|
5 |
namespace Markus.Service.DataBase.Test |
6 |
{ |
7 |
public class DataBaseDocPage |
8 |
{ |
9 |
public string ConnectionStr = "Data Source=cloud.devdoftech.co.kr,7777;Initial Catalog=markus;Persist Security Info=True;User ID=doftech;Password=dof1073#"; |
10 |
public Markus.Service.DataBase.DBMSType dbtype = DBMSType.MSSQL; |
11 |
|
12 |
|
13 |
[Test, Description("")] |
14 |
public void DocPageInsert() |
15 |
{ |
16 |
using (Markus.Service.DataBase.Repositories.DOCPAGERepository repository = new Repositories.DOCPAGERepository(ConnectionStr, dbtype)) |
17 |
{ |
18 |
List<Entities.DOCPAGE> pages = new List<Entities.DOCPAGE>(); |
19 |
|
20 |
for (int i = 0; i < 150000; i++) |
21 |
{ |
22 |
pages.Add(new Entities.DOCPAGE { DOCINFO_ID = "a764548c-9f44-4c4d-4597-f7ac43d2b7c1", PAGE_NUMBER = i+1, PAGE_WIDTH = "1210", PAGE_HEIGHT = "1210", PAGE_ANGLE = 0 }); |
23 |
} |
24 |
|
25 |
var result = repository.CreateAsync(pages).GetAwaiter().GetResult(); |
26 |
|
27 |
Console.WriteLine($"new id : {result}"); |
28 |
} |
29 |
} |
30 |
} |
31 |
} |