프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseServiceproperties.cs @ d85fc490

이력 | 보기 | 이력해설 | 다운로드 (1.59 KB)

1 264f0f92 GeunHo Song
using Dapper;
2
using NUnit.Framework;
3
using System;
4
using System.Collections.Generic;
5
6
namespace Markus.Service.DataBase.Test
7
{
8
    /// <summary>
9
    /// PostgreSQL
10
    /// </summary>
11
    public class DataBaseServiceproperties : TestBaseMSSQL
12
    {
13 3fb3351b GeunHo Song
        /// <summary>
14
        /// Get SERVICE_PROPERTIES
15
        /// </summary>
16
        [Test, Description("SERVICEPROPERTIES")]
17
        public void GetServiceProperties()
18 264f0f92 GeunHo Song
        {
19
            using (Markus.Service.DataBase.Repositories.SERVICEPROPERTIESRepository repository = new Repositories.SERVICEPROPERTIESRepository(ConnectionStr, dbtype))
20
            {
21 3fb3351b GeunHo Song
                var sERVICEPROPERTIEs = repository.GetAsync().GetAwaiter().GetResult();
22 264f0f92 GeunHo Song
23 3fb3351b GeunHo Song
                foreach (var serviceproperty in sERVICEPROPERTIEs) {
24
                    Console.WriteLine($"ID : {serviceproperty.ID}");
25
                    break;
26
                }
27
            }
28
        }
29 264f0f92 GeunHo Song
30 3fb3351b GeunHo Song
        /// <summary>
31
        /// Get SERVICE_PROPERTY
32
        /// </summary>
33
        [Test, Description("SERVICE_PROPERTY")]
34
        public void GetServiceProperty()
35
        {
36
            using (Markus.Service.DataBase.Repositories.SERVICEPROPERTIESRepository repository = new Repositories.SERVICEPROPERTIESRepository(ConnectionStr, dbtype))
37
            {
38
                var serviceDatas = repository.GetAsync().GetAwaiter().GetResult();
39
40
                if(serviceDatas.Count> 0) {
41
                    var serviceproperty = repository.GetSingleAsync(serviceDatas[0].ID).GetAwaiter().GetResult();
42
                    Console.WriteLine($"ID : {serviceproperty.ID}");
43
                }
44 264f0f92 GeunHo Song
            }
45
        }
46 3fb3351b GeunHo Song
47 264f0f92 GeunHo Song
    }
48
}
클립보드 이미지 추가 (최대 크기: 500 MB)