markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocInfo.cs @ d85fc490
이력 | 보기 | 이력해설 | 다운로드 (1.08 KB)
1 |
using NUnit.Framework; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
|
5 |
namespace Markus.Service.DataBase.Test |
6 |
{ |
7 |
public class DataBaseDocInfo : TestBaseMSSQL |
8 |
{ |
9 |
[Test, Description("DocInfoInsert")] |
10 |
public void DocInfoInsert() |
11 |
{ |
12 |
string newConvertDocID = string.Empty; |
13 |
|
14 |
using (Markus.Service.DataBase.Repositories.ConvertDocRepository repository = new Repositories.ConvertDocRepository(ConnectionStr, dbtype)) { |
15 |
newConvertDocID = repository.CreateAsync(ProjectNo, docUri, "111111").GetAwaiter().GetResult(); |
16 |
Console.WriteLine($"new id : {newConvertDocID}"); |
17 |
} |
18 |
|
19 |
if (!string.IsNullOrEmpty(newConvertDocID)) { |
20 |
using (Markus.Service.DataBase.Repositories.DOCINFORepository repository = new Repositories.DOCINFORepository(ConnectionStr, dbtype)) |
21 |
{ |
22 |
var result = repository.CreateAsync(newConvertDocID, 10).GetAwaiter().GetResult(); |
23 |
|
24 |
Console.WriteLine($"new id : {result}"); |
25 |
} |
26 |
} |
27 |
} |
28 |
} |
29 |
} |