markus / DataBase / DatabseModelCRUDSampleDLL / TestDataBase.cs @ 0630b634
이력 | 보기 | 이력해설 | 다운로드 (914 Bytes)
1 |
using Markus.EntityModel; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
|
8 |
namespace DatabseModelCRUDSampleDLL |
9 |
{ |
10 |
public class TestDataBase : IDisposable |
11 |
{ |
12 |
MarkusModel entities; |
13 |
|
14 |
public TestDataBase(string ConnectionString) |
15 |
{ |
16 |
try |
17 |
{ |
18 |
//해당 프로젝트의 데이터베이스 연결 |
19 |
entities = new MarkusModel(ConnectionString); |
20 |
} |
21 |
catch (Exception ex) |
22 |
{ |
23 |
throw ex; |
24 |
} |
25 |
} |
26 |
|
27 |
public List<CONVERTER_DOC> GetConvertDoc(int takeCount) |
28 |
{ |
29 |
return entities.CONVERTER_DOC.Take(takeCount).ToList(); |
30 |
} |
31 |
|
32 |
public void Dispose() |
33 |
{ |
34 |
if (entities != null) |
35 |
{ |
36 |
entities.Dispose(); |
37 |
} |
38 |
} |
39 |
} |
40 |
} |