개정판 0630b634
entity model 분리
Change-Id: I94b12f0fd236f4c93177ad3bf49db378887d9353
DataBase/DatabseModelCRUDSampleDLL/DatabseModelCRUDSampleDLL.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{5A357291-C483-4101-B604-DF20A2551BCB}</ProjectGuid> |
|
8 |
<OutputType>Library</OutputType> |
|
9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
10 |
<RootNamespace>DatabseModelCRUDSampleDLL</RootNamespace> |
|
11 |
<AssemblyName>DatabseModelCRUDSampleDLL</AssemblyName> |
|
12 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
13 |
<FileAlignment>512</FileAlignment> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<DebugSymbols>true</DebugSymbols> |
|
18 |
<DebugType>full</DebugType> |
|
19 |
<Optimize>false</Optimize> |
|
20 |
<OutputPath>bin\Debug\</OutputPath> |
|
21 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
22 |
<ErrorReport>prompt</ErrorReport> |
|
23 |
<WarningLevel>4</WarningLevel> |
|
24 |
</PropertyGroup> |
|
25 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
26 |
<DebugType>pdbonly</DebugType> |
|
27 |
<Optimize>true</Optimize> |
|
28 |
<OutputPath>bin\Release\</OutputPath> |
|
29 |
<DefineConstants>TRACE</DefineConstants> |
|
30 |
<ErrorReport>prompt</ErrorReport> |
|
31 |
<WarningLevel>4</WarningLevel> |
|
32 |
</PropertyGroup> |
|
33 |
<ItemGroup> |
|
34 |
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
35 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> |
|
36 |
</Reference> |
|
37 |
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
38 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
|
39 |
</Reference> |
|
40 |
<Reference Include="Markus.EntityModel, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
|
41 |
<HintPath>..\packages\MarkusDatabase.1.7.2\lib\net45\Markus.EntityModel.dll</HintPath> |
|
42 |
</Reference> |
|
43 |
<Reference Include="System" /> |
|
44 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|
45 |
<Reference Include="System.Core" /> |
|
46 |
<Reference Include="System.Xml.Linq" /> |
|
47 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
48 |
<Reference Include="Microsoft.CSharp" /> |
|
49 |
<Reference Include="System.Data" /> |
|
50 |
<Reference Include="System.Net.Http" /> |
|
51 |
<Reference Include="System.Xml" /> |
|
52 |
</ItemGroup> |
|
53 |
<ItemGroup> |
|
54 |
<Compile Include="TestDataBase.cs" /> |
|
55 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
56 |
</ItemGroup> |
|
57 |
<ItemGroup> |
|
58 |
<None Include="App.config" /> |
|
59 |
<None Include="packages.config" /> |
|
60 |
</ItemGroup> |
|
61 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
62 |
</Project> |
DataBase/DatabseModelCRUDSampleDLL/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("DatabseModelCRUDSampleDLL")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("DatabseModelCRUDSampleDLL")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2019")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("5a357291-c483-4101-b604-df20a2551bcb")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 |
|
33 |
// 기본값으로 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
DataBase/DatabseModelCRUDSampleDLL/TestDataBase.cs | ||
---|---|---|
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 |
} |
DataBase/EntityModel.sln | ||
---|---|---|
1 |
|
|
2 |
Microsoft Visual Studio Solution File, Format Version 12.00 |
|
3 |
# Visual Studio 15 |
|
4 |
VisualStudioVersion = 15.0.28307.757 |
|
5 |
MinimumVisualStudioVersion = 10.0.40219.1 |
|
6 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDataBaseTest", "WpfDataBaseTest\WpfDataBaseTest.csproj", "{B8F30C6E-9544-4DE8-A9B2-775FD30E2AC9}" |
|
7 |
EndProject |
|
8 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabseModelCRUDSampleDLL", "DatabseModelCRUDSampleDLL\DatabseModelCRUDSampleDLL.csproj", "{5A357291-C483-4101-B604-DF20A2551BCB}" |
|
9 |
EndProject |
|
10 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Markus.EntityModel", "EntityModel\Markus.EntityModel.csproj", "{E530645A-1B01-4060-96FC-D15B49E17D51}" |
|
11 |
EndProject |
|
12 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PakageTest", "PakageTest\PakageTest.csproj", "{DDDC91B6-CE98-4345-9BD7-74E159E0A70A}" |
|
13 |
EndProject |
|
14 |
Global |
|
15 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|
16 |
Debug|Any CPU = Debug|Any CPU |
|
17 |
Release|Any CPU = Release|Any CPU |
|
18 |
EndGlobalSection |
|
19 |
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|
20 |
{B8F30C6E-9544-4DE8-A9B2-775FD30E2AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
21 |
{B8F30C6E-9544-4DE8-A9B2-775FD30E2AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
22 |
{B8F30C6E-9544-4DE8-A9B2-775FD30E2AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
23 |
{B8F30C6E-9544-4DE8-A9B2-775FD30E2AC9}.Release|Any CPU.Build.0 = Release|Any CPU |
|
24 |
{5A357291-C483-4101-B604-DF20A2551BCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
25 |
{5A357291-C483-4101-B604-DF20A2551BCB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
26 |
{5A357291-C483-4101-B604-DF20A2551BCB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
27 |
{5A357291-C483-4101-B604-DF20A2551BCB}.Release|Any CPU.Build.0 = Release|Any CPU |
|
28 |
{E530645A-1B01-4060-96FC-D15B49E17D51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
29 |
{E530645A-1B01-4060-96FC-D15B49E17D51}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
30 |
{E530645A-1B01-4060-96FC-D15B49E17D51}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
31 |
{E530645A-1B01-4060-96FC-D15B49E17D51}.Release|Any CPU.Build.0 = Release|Any CPU |
|
32 |
{DDDC91B6-CE98-4345-9BD7-74E159E0A70A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
33 |
{DDDC91B6-CE98-4345-9BD7-74E159E0A70A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
34 |
{DDDC91B6-CE98-4345-9BD7-74E159E0A70A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
35 |
{DDDC91B6-CE98-4345-9BD7-74E159E0A70A}.Release|Any CPU.Build.0 = Release|Any CPU |
|
36 |
EndGlobalSection |
|
37 |
GlobalSection(SolutionProperties) = preSolution |
|
38 |
HideSolutionNode = FALSE |
|
39 |
EndGlobalSection |
|
40 |
GlobalSection(ExtensibilityGlobals) = postSolution |
|
41 |
SolutionGuid = {FBA3E879-6B25-4A8A-9096-7F1E09C5B18F} |
|
42 |
EndGlobalSection |
|
43 |
EndGlobal |
DataBase/EntityModel/ATTACH_URL.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class ATTACH_URL |
|
16 |
{ |
|
17 |
public int ID { get; set; } |
|
18 |
public string GROUP_ID { get; set; } |
|
19 |
public string ATTACH_URL1 { get; set; } |
|
20 |
public string FILE_NAME { get; set; } |
|
21 |
public string CREATE_USER_ID { get; set; } |
|
22 |
public System.DateTime CREATE_DATE { get; set; } |
|
23 |
|
|
24 |
public virtual DOCUMENT_ITEM DOCUMENT_ITEM { get; set; } |
|
25 |
} |
|
26 |
} |
DataBase/EntityModel/CERTIFY_CMS_TEST.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class CERTIFY_CMS_TEST |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string MEMBER_ID { get; set; } |
|
19 |
public string ACCESSTOKEN { get; set; } |
|
20 |
public string LOGIN_DATE { get; set; } |
|
21 |
public string EXPIRE_DATE { get; set; } |
|
22 |
public int DEVICE_TYPE { get; set; } |
|
23 |
public string DEVICE_SERIAL_NUMBER { get; set; } |
|
24 |
} |
|
25 |
} |
DataBase/EntityModel/CONVERTER_DOC.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class CONVERTER_DOC |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string PROJECT_NO { get; set; } |
|
19 |
public string DOCUMENT_URL { get; set; } |
|
20 |
public string DOCUMENT_ID { get; set; } |
|
21 |
public System.DateTime CREATE_DATETIME { get; set; } |
|
22 |
public int STATUS { get; set; } |
|
23 |
public int TOTAL_PAGE { get; set; } |
|
24 |
public int CURRENT_PAGE { get; set; } |
|
25 |
public string EXCEPTION { get; set; } |
|
26 |
public Nullable<System.DateTime> END_DATETIME { get; set; } |
|
27 |
public Nullable<System.DateTime> START_DATETIME { get; set; } |
|
28 |
public string SERVICE_ID { get; set; } |
|
29 |
public int RECONVERTER { get; set; } |
|
30 |
} |
|
31 |
} |
DataBase/EntityModel/DOCINFO.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class DOCINFO |
|
16 |
{ |
|
17 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] |
|
18 |
public DOCINFO() |
|
19 |
{ |
|
20 |
this.DOCPAGE = new HashSet<DOCPAGE>(); |
|
21 |
this.MARKUP_INFO = new HashSet<MARKUP_INFO>(); |
|
22 |
} |
|
23 |
|
|
24 |
public string ID { get; set; } |
|
25 |
public string ORIGINAL_FILE { get; set; } |
|
26 |
public string DOCUMENT_ID { get; set; } |
|
27 |
public int PAGE_COUNT { get; set; } |
|
28 |
public string PROJECT_NO { get; set; } |
|
29 |
|
|
30 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
31 |
public virtual ICollection<DOCPAGE> DOCPAGE { get; set; } |
|
32 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
33 |
public virtual ICollection<MARKUP_INFO> MARKUP_INFO { get; set; } |
|
34 |
} |
|
35 |
} |
DataBase/EntityModel/DOCPAGE.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class DOCPAGE |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string DOCINFO_ID { get; set; } |
|
19 |
public int PAGE_NUMBER { get; set; } |
|
20 |
public string PAGE_WIDTH { get; set; } |
|
21 |
public string PAGE_HEIGHT { get; set; } |
|
22 |
public int PAGE_ANGLE { get; set; } |
|
23 |
|
|
24 |
public virtual DOCINFO DOCINFO { get; set; } |
|
25 |
} |
|
26 |
} |
DataBase/EntityModel/DOCUMENT_ITEM.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class DOCUMENT_ITEM |
|
16 |
{ |
|
17 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] |
|
18 |
public DOCUMENT_ITEM() |
|
19 |
{ |
|
20 |
this.ATTACH_URL = new HashSet<ATTACH_URL>(); |
|
21 |
} |
|
22 |
|
|
23 |
public string ID { get; set; } |
|
24 |
public string REVISION { get; set; } |
|
25 |
public string DOCUMENT_NO { get; set; } |
|
26 |
public string DOCUMENT_NAME { get; set; } |
|
27 |
public string GROUP_NO { get; set; } |
|
28 |
public string ORIGINAL_FILE { get; set; } |
|
29 |
public string DOCUMENT_ID { get; set; } |
|
30 |
public string RESULT_FILE { get; set; } |
|
31 |
public string RESULT { get; set; } |
|
32 |
public string PROJECT_NO { get; set; } |
|
33 |
public string Link { get; set; } |
|
34 |
|
|
35 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
36 |
public virtual ICollection<ATTACH_URL> ATTACH_URL { get; set; } |
|
37 |
} |
|
38 |
} |
DataBase/EntityModel/ERROR_LOG.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class ERROR_LOG |
|
16 |
{ |
|
17 |
public int ID { get; set; } |
|
18 |
public string SERVICE_NAME { get; set; } |
|
19 |
public string LEVEL { get; set; } |
|
20 |
public string TYPE { get; set; } |
|
21 |
public string CONTENTS { get; set; } |
|
22 |
public string CREATE_DATETIME { get; set; } |
|
23 |
public string CODE { get; set; } |
|
24 |
public string DOCUMENT_ID { get; set; } |
|
25 |
public string PROJECT_NO { get; set; } |
|
26 |
} |
|
27 |
} |
DataBase/EntityModel/FAVORITE_DOC.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class FAVORITE_DOC |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string PROJECT_NO { get; set; } |
|
19 |
public string DOCUMENT_ID { get; set; } |
|
20 |
public string GROUP_NO { get; set; } |
|
21 |
public string DOCUMENT_NO { get; set; } |
|
22 |
public string MEMBER_USER_ID { get; set; } |
|
23 |
public string DESCRIPTION { get; set; } |
|
24 |
public System.DateTime CREATE_TIME { get; set; } |
|
25 |
public int FLAG { get; set; } |
|
26 |
public string REVISION { get; set; } |
|
27 |
public int PAGE_NO { get; set; } |
|
28 |
|
|
29 |
public virtual MEMBER MEMBER { get; set; } |
|
30 |
} |
|
31 |
} |
DataBase/EntityModel/FINAL_PDF.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class FINAL_PDF |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string PROJECT_NO { get; set; } |
|
19 |
public int DOCINFO_ID { get; set; } |
|
20 |
public int MARKUPINFO_ID { get; set; } |
|
21 |
public string CREATE_USER_ID { get; set; } |
|
22 |
public System.DateTime CREATE_DATETIME { get; set; } |
|
23 |
public int STATUS { get; set; } |
|
24 |
public int TOTAL_PAGE { get; set; } |
|
25 |
public int CURRENT_PAGE { get; set; } |
|
26 |
public string EXCEPTION { get; set; } |
|
27 |
public Nullable<System.DateTime> END_DATETIME { get; set; } |
|
28 |
public Nullable<System.DateTime> START_DATETIME { get; set; } |
|
29 |
public string DOCUMENT_ID { get; set; } |
|
30 |
} |
|
31 |
} |
DataBase/EntityModel/LOGIN_STAMP.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class LOGIN_STAMP |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string USER_ID { get; set; } |
|
19 |
public string PROJECT_NO { get; set; } |
|
20 |
public string DOCUMENT_ID { get; set; } |
|
21 |
public System.DateTime START_DATETIME { get; set; } |
|
22 |
public Nullable<System.DateTime> END_DATETIME { get; set; } |
|
23 |
public int ISLOGIN { get; set; } |
|
24 |
} |
|
25 |
} |
DataBase/EntityModel/MARKUP_CHECKLIST.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MARKUP_CHECKLIST |
|
16 |
{ |
|
17 |
public int CK_NO { get; set; } |
|
18 |
public string CK_REV_NO { get; set; } |
|
19 |
public Nullable<int> CK_PAGE { get; set; } |
|
20 |
public string CK_COMMENT { get; set; } |
|
21 |
public string CK_TODO { get; set; } |
|
22 |
public string CK_STATUS { get; set; } |
|
23 |
public string CK_RESULT { get; set; } |
|
24 |
} |
|
25 |
} |
DataBase/EntityModel/MARKUP_DATA.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MARKUP_DATA |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public int PAGENUMBER { get; set; } |
|
19 |
public string DATA { get; set; } |
|
20 |
public string MARKUPINFO_VERSION_ID { get; set; } |
|
21 |
public int DATA_TYPE { get; set; } |
|
22 |
|
|
23 |
public virtual MARKUP_INFO_VERSION MARKUP_INFO_VERSION { get; set; } |
|
24 |
} |
|
25 |
} |
DataBase/EntityModel/MARKUP_INFO.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MARKUP_INFO |
|
16 |
{ |
|
17 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] |
|
18 |
public MARKUP_INFO() |
|
19 |
{ |
|
20 |
this.MARKUP_INFO_VERSION = new HashSet<MARKUP_INFO_VERSION>(); |
|
21 |
} |
|
22 |
|
|
23 |
public string ID { get; set; } |
|
24 |
public string DOCINFO_ID { get; set; } |
|
25 |
public string USER_ID { get; set; } |
|
26 |
public System.DateTime CREATE_TIME { get; set; } |
|
27 |
public int CONSOLIDATE { get; set; } |
|
28 |
public string DESCRIPTION { get; set; } |
|
29 |
public int AVOID_CONSOLIDATE { get; set; } |
|
30 |
public int PART_CONSOLIDATE { get; set; } |
|
31 |
public Nullable<System.DateTime> UPDATE_TIME { get; set; } |
|
32 |
|
|
33 |
public virtual DOCINFO DOCINFO { get; set; } |
|
34 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
35 |
public virtual ICollection<MARKUP_INFO_VERSION> MARKUP_INFO_VERSION { get; set; } |
|
36 |
} |
|
37 |
} |
DataBase/EntityModel/MARKUP_INFO_VERSION.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MARKUP_INFO_VERSION |
|
16 |
{ |
|
17 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] |
|
18 |
public MARKUP_INFO_VERSION() |
|
19 |
{ |
|
20 |
this.MARKUP_DATA = new HashSet<MARKUP_DATA>(); |
|
21 |
} |
|
22 |
|
|
23 |
public string ID { get; set; } |
|
24 |
public string MARKUPINFO_ID { get; set; } |
|
25 |
public System.DateTime CREATE_DATE { get; set; } |
|
26 |
|
|
27 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
28 |
public virtual ICollection<MARKUP_DATA> MARKUP_DATA { get; set; } |
|
29 |
public virtual MARKUP_INFO MARKUP_INFO { get; set; } |
|
30 |
} |
|
31 |
} |
DataBase/EntityModel/MEMBER.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MEMBER |
|
16 |
{ |
|
17 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] |
|
18 |
public MEMBER() |
|
19 |
{ |
|
20 |
this.FAVORITE_DOC = new HashSet<FAVORITE_DOC>(); |
|
21 |
this.SIGN_INFO = new HashSet<SIGN_INFO>(); |
|
22 |
this.SYMBOL_PRIVATE = new HashSet<SYMBOL_PRIVATE>(); |
|
23 |
} |
|
24 |
|
|
25 |
public string ID { get; set; } |
|
26 |
public string DEPARTMENT { get; set; } |
|
27 |
public string NAME { get; set; } |
|
28 |
public string POSITION { get; set; } |
|
29 |
public string EMAIL_ADDRESS { get; set; } |
|
30 |
|
|
31 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
32 |
public virtual ICollection<FAVORITE_DOC> FAVORITE_DOC { get; set; } |
|
33 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
34 |
public virtual ICollection<SIGN_INFO> SIGN_INFO { get; set; } |
|
35 |
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] |
|
36 |
public virtual ICollection<SYMBOL_PRIVATE> SYMBOL_PRIVATE { get; set; } |
|
37 |
} |
|
38 |
} |
DataBase/EntityModel/MEMBER_CMS_TEST.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Collections.Generic; |
|
14 |
|
|
15 |
public partial class MEMBER_CMS_TEST |
|
16 |
{ |
|
17 |
public string ID { get; set; } |
|
18 |
public string MEMBER_ID { get; set; } |
|
19 |
public string MEMBER_PASS { get; set; } |
|
20 |
} |
|
21 |
} |
DataBase/EntityModel/Markus.EntityModel.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{E530645A-1B01-4060-96FC-D15B49E17D51}</ProjectGuid> |
|
8 |
<OutputType>Library</OutputType> |
|
9 |
<RootNamespace>Markus.EntityModel</RootNamespace> |
|
10 |
<AssemblyName>Markus.EntityModel</AssemblyName> |
|
11 |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
12 |
<FileAlignment>512</FileAlignment> |
|
13 |
<Deterministic>true</Deterministic> |
|
14 |
<PublishUrl>publish\</PublishUrl> |
|
15 |
<Install>true</Install> |
|
16 |
<InstallFrom>Disk</InstallFrom> |
|
17 |
<UpdateEnabled>false</UpdateEnabled> |
|
18 |
<UpdateMode>Foreground</UpdateMode> |
|
19 |
<UpdateInterval>7</UpdateInterval> |
|
20 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
21 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
22 |
<UpdateRequired>false</UpdateRequired> |
|
23 |
<MapFileExtensions>true</MapFileExtensions> |
|
24 |
<ApplicationRevision>0</ApplicationRevision> |
|
25 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
26 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
27 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
28 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
29 |
</PropertyGroup> |
|
30 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
31 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
32 |
<DebugSymbols>true</DebugSymbols> |
|
33 |
<DebugType>full</DebugType> |
|
34 |
<Optimize>false</Optimize> |
|
35 |
<OutputPath>..\Output\Debug\</OutputPath> |
|
36 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
37 |
<ErrorReport>prompt</ErrorReport> |
|
38 |
<WarningLevel>4</WarningLevel> |
|
39 |
</PropertyGroup> |
|
40 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
41 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
42 |
<DebugType>pdbonly</DebugType> |
|
43 |
<Optimize>true</Optimize> |
|
44 |
<OutputPath>..\OutPut\Release\</OutputPath> |
|
45 |
<DefineConstants> |
|
46 |
</DefineConstants> |
|
47 |
<ErrorReport>prompt</ErrorReport> |
|
48 |
<WarningLevel>4</WarningLevel> |
|
49 |
</PropertyGroup> |
|
50 |
<PropertyGroup> |
|
51 |
<StartupObject /> |
|
52 |
</PropertyGroup> |
|
53 |
<ItemGroup> |
|
54 |
<None Include="App.config" /> |
|
55 |
<EntityDeploy Include="MarkusModel.edmx"> |
|
56 |
<Generator>EntityModelCodeGenerator</Generator> |
|
57 |
<LastGenOutput>MarkusModel.Designer.cs</LastGenOutput> |
|
58 |
</EntityDeploy> |
|
59 |
<None Include="MarkusModel.edmx.diagram"> |
|
60 |
<DependentUpon>MarkusModel.edmx</DependentUpon> |
|
61 |
</None> |
|
62 |
<None Include="packages.config" /> |
|
63 |
</ItemGroup> |
|
64 |
<ItemGroup> |
|
65 |
<Content Include="MarkusDB.mdf" /> |
|
66 |
<Content Include="MarkusDB_log.ldf"> |
|
67 |
<DependentUpon>MarkusDB.mdf</DependentUpon> |
|
68 |
</Content> |
|
69 |
<Content Include="MarkusModel.Context.tt"> |
|
70 |
<Generator>TextTemplatingFileGenerator</Generator> |
|
71 |
<DependentUpon>MarkusModel.edmx</DependentUpon> |
|
72 |
<LastGenOutput>MarkusModel.Context.cs</LastGenOutput> |
|
73 |
</Content> |
|
74 |
<Content Include="MarkusModel.tt"> |
|
75 |
<Generator>TextTemplatingFileGenerator</Generator> |
|
76 |
<DependentUpon>MarkusModel.edmx</DependentUpon> |
|
77 |
<LastGenOutput>MarkusModel.cs</LastGenOutput> |
|
78 |
</Content> |
|
79 |
</ItemGroup> |
|
80 |
<ItemGroup> |
|
81 |
<Compile Include="ATTACH_URL.cs"> |
|
82 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
83 |
</Compile> |
|
84 |
<Compile Include="CERTIFY_CMS_TEST.cs"> |
|
85 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
86 |
</Compile> |
|
87 |
<Compile Include="CONVERTER_DOC.cs"> |
|
88 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
89 |
</Compile> |
|
90 |
<Compile Include="DOCINFO.cs"> |
|
91 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
92 |
</Compile> |
|
93 |
<Compile Include="DOCPAGE.cs"> |
|
94 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
95 |
</Compile> |
|
96 |
<Compile Include="DOCUMENT_ITEM.cs"> |
|
97 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
98 |
</Compile> |
|
99 |
<Compile Include="ERROR_LOG.cs"> |
|
100 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
101 |
</Compile> |
|
102 |
<Compile Include="FAVORITE_DOC.cs"> |
|
103 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
104 |
</Compile> |
|
105 |
<Compile Include="FINAL_PDF.cs"> |
|
106 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
107 |
</Compile> |
|
108 |
<Compile Include="LOGIN_STAMP.cs"> |
|
109 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
110 |
</Compile> |
|
111 |
<Compile Include="MARKUP_CHECKLIST.cs"> |
|
112 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
113 |
</Compile> |
|
114 |
<Compile Include="MARKUP_DATA.cs"> |
|
115 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
116 |
</Compile> |
|
117 |
<Compile Include="MARKUP_INFO.cs"> |
|
118 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
119 |
</Compile> |
|
120 |
<Compile Include="MARKUP_INFO_VERSION.cs"> |
|
121 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
122 |
</Compile> |
|
123 |
<Compile Include="MarkusEntities.cs" /> |
|
124 |
<Compile Include="MarkusModel.Context.cs"> |
|
125 |
<AutoGen>True</AutoGen> |
|
126 |
<DesignTime>True</DesignTime> |
|
127 |
<DependentUpon>MarkusModel.Context.tt</DependentUpon> |
|
128 |
</Compile> |
|
129 |
<Compile Include="MarkusModel.cs"> |
|
130 |
<AutoGen>True</AutoGen> |
|
131 |
<DesignTime>True</DesignTime> |
|
132 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
133 |
</Compile> |
|
134 |
<Compile Include="MarkusModel.Designer.cs"> |
|
135 |
<AutoGen>True</AutoGen> |
|
136 |
<DesignTime>True</DesignTime> |
|
137 |
<DependentUpon>MarkusModel.edmx</DependentUpon> |
|
138 |
</Compile> |
|
139 |
<Compile Include="MEMBER.cs"> |
|
140 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
141 |
</Compile> |
|
142 |
<Compile Include="MEMBER_CMS_TEST.cs"> |
|
143 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
144 |
</Compile> |
|
145 |
<Compile Include="PRINT_DOC.cs"> |
|
146 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
147 |
</Compile> |
|
148 |
<Compile Include="PRINT_EXCEL.cs"> |
|
149 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
150 |
</Compile> |
|
151 |
<Compile Include="PROJECT_SETTING.cs"> |
|
152 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
153 |
</Compile> |
|
154 |
<Compile Include="PROPERTIES.cs"> |
|
155 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
156 |
</Compile> |
|
157 |
<Compile Include="RUN_PROJECTS.cs"> |
|
158 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
159 |
</Compile> |
|
160 |
<Compile Include="SERVICE_PROPERTIES.cs"> |
|
161 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
162 |
</Compile> |
|
163 |
<Compile Include="SIGN_INFO.cs"> |
|
164 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
165 |
</Compile> |
|
166 |
<Compile Include="SYMBOL_PRIVATE.cs"> |
|
167 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
168 |
</Compile> |
|
169 |
<Compile Include="SYMBOL_PUBLIC.cs"> |
|
170 |
<DependentUpon>MarkusModel.tt</DependentUpon> |
|
171 |
</Compile> |
|
172 |
</ItemGroup> |
|
173 |
<ItemGroup> |
|
174 |
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
175 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> |
|
176 |
</Reference> |
|
177 |
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> |
|
178 |
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> |
|
179 |
</Reference> |
|
180 |
<Reference Include="System" /> |
|
181 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|
182 |
<Reference Include="System.Data" /> |
|
183 |
<Reference Include="System.Runtime.Serialization" /> |
|
184 |
<Reference Include="System.Security" /> |
|
185 |
<Reference Include="System.Xml" /> |
|
186 |
</ItemGroup> |
|
187 |
<ItemGroup> |
|
188 |
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" /> |
|
189 |
</ItemGroup> |
|
190 |
<ItemGroup> |
|
191 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
192 |
<Visible>False</Visible> |
|
193 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
194 |
<Install>false</Install> |
|
195 |
</BootstrapperPackage> |
|
196 |
</ItemGroup> |
|
197 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
198 |
</Project> |
DataBase/EntityModel/MarkusEntities.cs | ||
---|---|---|
1 |
|
|
2 |
namespace Markus.EntityModel |
|
3 |
{ |
|
4 |
using System; |
|
5 |
using System.Data.Entity; |
|
6 |
using System.Data.Entity.Core.EntityClient; |
|
7 |
using System.Data.Entity.Infrastructure; |
|
8 |
using System.Data.SqlClient; |
|
9 |
|
|
10 |
public partial class MarkusModel : DbContext |
|
11 |
{ |
|
12 |
private const string providerName = "System.Data.SqlClient"; |
|
13 |
private const string MarkusMeta = @"res://*/MarkusModel.csdl|res://*/MarkusModel.ssdl|res://*/MarkusModel.msl"; |
|
14 |
|
|
15 |
public MarkusModel(string ConnectionString) |
|
16 |
: base(ConnectionStringBuilder(ConnectionString).ToString()) |
|
17 |
{ |
|
18 |
this.Database.CommandTimeout = 60; |
|
19 |
} |
|
20 |
|
|
21 |
private static EntityConnectionStringBuilder ConnectionStringBuilder(string ConnectionString) |
|
22 |
{ |
|
23 |
//SqlConnectionStringBuilder _bl = new SqlConnectionStringBuilder(string.Format(Properties.Settings.Default.ProjectCIConnectionString, "DeepView")); |
|
24 |
SqlConnectionStringBuilder _bl = new SqlConnectionStringBuilder(ConnectionString); |
|
25 |
return EntityConnectionBuilder(_bl, MarkusMeta); |
|
26 |
} |
|
27 |
|
|
28 |
private static EntityConnectionStringBuilder |
|
29 |
EntityConnectionBuilder(SqlConnectionStringBuilder SqlStringBuilder, string EntityMetaData) |
|
30 |
{ |
|
31 |
string providerString = SqlStringBuilder.ToString(); |
|
32 |
|
|
33 |
EntityConnectionStringBuilder entityBuilder = new EntityConnectionStringBuilder(); |
|
34 |
|
|
35 |
|
|
36 |
entityBuilder.Provider = providerName; |
|
37 |
entityBuilder.ProviderConnectionString = providerString; |
|
38 |
entityBuilder.Metadata = EntityMetaData; |
|
39 |
|
|
40 |
//Console.WriteLine(entityBuilder.ToString()); |
|
41 |
|
|
42 |
using (EntityConnection conn = |
|
43 |
new EntityConnection(entityBuilder.ToString())) |
|
44 |
{ |
|
45 |
try |
|
46 |
{ |
|
47 |
conn.Open(); |
|
48 |
//Console.WriteLine("Just testing the connection."); |
|
49 |
conn.Close(); |
|
50 |
} |
|
51 |
catch (Exception ex) |
|
52 |
{ |
|
53 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
|
54 |
throw ex; |
|
55 |
} |
|
56 |
|
|
57 |
} |
|
58 |
|
|
59 |
return entityBuilder; |
|
60 |
} |
|
61 |
|
|
62 |
} |
|
63 |
} |
DataBase/EntityModel/MarkusModel.Context.cs | ||
---|---|---|
1 |
//------------------------------------------------------------------------------ |
|
2 |
// <auto-generated> |
|
3 |
// 이 코드는 템플릿에서 생성되었습니다. |
|
4 |
// |
|
5 |
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다. |
|
6 |
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다. |
|
7 |
// </auto-generated> |
|
8 |
//------------------------------------------------------------------------------ |
|
9 |
|
|
10 |
namespace Markus.EntityModel |
|
11 |
{ |
|
12 |
using System; |
|
13 |
using System.Data.Entity; |
|
14 |
using System.Data.Entity.Infrastructure; |
|
15 |
|
|
16 |
public partial class MarkusModel : DbContext |
|
17 |
{ |
|
18 |
public MarkusModel() |
|
19 |
: base("name=MarkusModel") |
|
20 |
{ |
|
21 |
} |
|
22 |
|
|
23 |
protected override void OnModelCreating(DbModelBuilder modelBuilder) |
|
24 |
{ |
|
25 |
throw new UnintentionalCodeFirstException(); |
|
26 |
} |
|
27 |
|
|
28 |
public virtual DbSet<ATTACH_URL> ATTACH_URL { get; set; } |
|
29 |
public virtual DbSet<CERTIFY_CMS_TEST> CERTIFY_CMS_TEST { get; set; } |
|
30 |
public virtual DbSet<CONVERTER_DOC> CONVERTER_DOC { get; set; } |
|
31 |
public virtual DbSet<DOCINFO> DOCINFO { get; set; } |
|
32 |
public virtual DbSet<DOCPAGE> DOCPAGE { get; set; } |
|
33 |
public virtual DbSet<DOCUMENT_ITEM> DOCUMENT_ITEM { get; set; } |
|
34 |
public virtual DbSet<ERROR_LOG> ERROR_LOG { get; set; } |
|
35 |
public virtual DbSet<FAVORITE_DOC> FAVORITE_DOC { get; set; } |
|
36 |
public virtual DbSet<FINAL_PDF> FINAL_PDF { get; set; } |
|
37 |
public virtual DbSet<LOGIN_STAMP> LOGIN_STAMP { get; set; } |
|
38 |
public virtual DbSet<MARKUP_CHECKLIST> MARKUP_CHECKLIST { get; set; } |
|
39 |
public virtual DbSet<MARKUP_DATA> MARKUP_DATA { get; set; } |
|
40 |
public virtual DbSet<MARKUP_INFO> MARKUP_INFO { get; set; } |
|
41 |
public virtual DbSet<MARKUP_INFO_VERSION> MARKUP_INFO_VERSION { get; set; } |
|
42 |
public virtual DbSet<MEMBER> MEMBER { get; set; } |
|
43 |
public virtual DbSet<MEMBER_CMS_TEST> MEMBER_CMS_TEST { get; set; } |
|
44 |
public virtual DbSet<PRINT_DOC> PRINT_DOC { get; set; } |
|
45 |
public virtual DbSet<PRINT_EXCEL> PRINT_EXCEL { get; set; } |
|
46 |
public virtual DbSet<PROJECT_SETTING> PROJECT_SETTING { get; set; } |
|
47 |
public virtual DbSet<PROPERTIES> PROPERTIES { get; set; } |
|
48 |
public virtual DbSet<RUN_PROJECTS> RUN_PROJECTS { get; set; } |
|
49 |
public virtual DbSet<SERVICE_PROPERTIES> SERVICE_PROPERTIES { get; set; } |
|
50 |
public virtual DbSet<SIGN_INFO> SIGN_INFO { get; set; } |
|
51 |
public virtual DbSet<SYMBOL_PRIVATE> SYMBOL_PRIVATE { get; set; } |
|
52 |
public virtual DbSet<SYMBOL_PUBLIC> SYMBOL_PUBLIC { get; set; } |
|
53 |
} |
|
54 |
} |
DataBase/EntityModel/MarkusModel.Context.tt | ||
---|---|---|
1 |
<#@ template language="C#" debug="false" hostspecific="true"#> |
|
2 |
<#@ include file="EF6.Utility.CS.ttinclude"#><#@ |
|
3 |
output extension=".cs"#><# |
|
4 |
|
|
5 |
const string inputFile = @"MarkusModel.edmx"; |
|
6 |
var textTransform = DynamicTextTransformation.Create(this); |
|
7 |
var code = new CodeGenerationTools(this); |
|
8 |
var ef = new MetadataTools(this); |
|
9 |
var typeMapper = new TypeMapper(code, ef, textTransform.Errors); |
|
10 |
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors); |
|
11 |
var itemCollection = loader.CreateEdmItemCollection(inputFile); |
|
12 |
var modelNamespace = loader.GetModelNamespace(inputFile); |
|
13 |
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef); |
|
14 |
|
|
15 |
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault(); |
|
16 |
if (container == null) |
|
17 |
{ |
|
18 |
return string.Empty; |
|
19 |
} |
|
20 |
#> |
|
21 |
//------------------------------------------------------------------------------ |
|
22 |
// <auto-generated> |
|
23 |
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#> |
|
24 |
// |
|
25 |
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#> |
|
26 |
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#> |
|
27 |
// </auto-generated> |
|
28 |
//------------------------------------------------------------------------------ |
|
29 |
|
|
30 |
<# |
|
31 |
|
|
32 |
var codeNamespace = code.VsNamespaceSuggestion(); |
|
33 |
if (!String.IsNullOrEmpty(codeNamespace)) |
|
34 |
{ |
|
35 |
#> |
|
36 |
namespace <#=code.EscapeNamespace(codeNamespace)#> |
|
37 |
{ |
|
38 |
<# |
|
39 |
PushIndent(" "); |
|
40 |
} |
|
41 |
|
|
42 |
#> |
|
43 |
using System; |
|
44 |
using System.Data.Entity; |
|
45 |
using System.Data.Entity.Infrastructure; |
|
46 |
<# |
|
47 |
if (container.FunctionImports.Any()) |
|
48 |
{ |
|
49 |
#> |
|
50 |
using System.Data.Entity.Core.Objects; |
|
51 |
using System.Linq; |
|
52 |
<# |
|
53 |
} |
|
54 |
#> |
|
55 |
|
|
56 |
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext |
|
57 |
{ |
|
58 |
public <#=code.Escape(container)#>() |
|
59 |
: base("name=<#=container.Name#>") |
|
60 |
{ |
|
61 |
<# |
|
62 |
if (!loader.IsLazyLoadingEnabled(container)) |
|
63 |
{ |
|
64 |
#> |
|
65 |
this.Configuration.LazyLoadingEnabled = false; |
|
66 |
<# |
|
67 |
} |
|
68 |
|
|
69 |
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>()) |
|
70 |
{ |
|
71 |
// Note: the DbSet members are defined below such that the getter and |
|
72 |
// setter always have the same accessibility as the DbSet definition |
|
73 |
if (Accessibility.ForReadOnlyProperty(entitySet) != "public") |
|
74 |
{ |
|
75 |
#> |
|
76 |
<#=codeStringGenerator.DbSetInitializer(entitySet)#> |
|
77 |
<# |
|
78 |
} |
|
79 |
} |
|
80 |
#> |
|
81 |
} |
|
82 |
|
|
83 |
protected override void OnModelCreating(DbModelBuilder modelBuilder) |
|
84 |
{ |
|
85 |
throw new UnintentionalCodeFirstException(); |
|
86 |
} |
|
87 |
|
|
88 |
<# |
|
89 |
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>()) |
|
90 |
{ |
|
91 |
#> |
|
92 |
<#=codeStringGenerator.DbSet(entitySet)#> |
|
93 |
<# |
|
94 |
} |
|
95 |
|
|
96 |
foreach (var edmFunction in container.FunctionImports) |
|
97 |
{ |
|
98 |
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false); |
|
99 |
} |
|
100 |
#> |
|
101 |
} |
|
102 |
<# |
|
103 |
|
|
104 |
if (!String.IsNullOrEmpty(codeNamespace)) |
|
105 |
{ |
|
106 |
PopIndent(); |
|
107 |
#> |
|
108 |
} |
|
109 |
<# |
|
110 |
} |
|
111 |
#> |
|
112 |
<#+ |
|
113 |
|
|
114 |
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) |
|
115 |
{ |
|
116 |
if (typeMapper.IsComposable(edmFunction)) |
|
117 |
{ |
|
118 |
#> |
|
119 |
|
|
120 |
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")] |
|
121 |
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#> |
|
122 |
{ |
|
123 |
<#+ |
|
124 |
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter); |
|
125 |
#> |
|
126 |
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#> |
|
127 |
} |
|
128 |
<#+ |
|
129 |
} |
|
130 |
else |
|
131 |
{ |
|
132 |
#> |
|
133 |
|
|
134 |
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#> |
|
135 |
{ |
|
136 |
<#+ |
|
137 |
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter); |
|
138 |
#> |
|
139 |
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#> |
|
140 |
} |
|
141 |
<#+ |
|
142 |
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption)) |
|
143 |
{ |
|
144 |
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true); |
|
145 |
} |
|
146 |
} |
|
147 |
} |
|
148 |
|
|
149 |
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit) |
|
150 |
{ |
|
151 |
#> |
|
152 |
var <#=name#> = <#=isNotNull#> ? |
|
153 |
<#=notNullInit#> : |
|
154 |
<#=nullInit#>; |
|
155 |
|
|
156 |
<#+ |
|
157 |
} |
|
158 |
|
|
159 |
public const string TemplateId = "CSharp_DbContext_Context_EF6"; |
|
160 |
|
|
161 |
public class CodeStringGenerator |
|
162 |
{ |
|
163 |
private readonly CodeGenerationTools _code; |
|
164 |
private readonly TypeMapper _typeMapper; |
|
165 |
private readonly MetadataTools _ef; |
|
166 |
|
|
167 |
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef) |
|
168 |
{ |
|
169 |
ArgumentNotNull(code, "code"); |
|
170 |
ArgumentNotNull(typeMapper, "typeMapper"); |
|
171 |
ArgumentNotNull(ef, "ef"); |
|
172 |
|
|
173 |
_code = code; |
|
174 |
_typeMapper = typeMapper; |
|
175 |
_ef = ef; |
|
176 |
} |
|
177 |
|
|
178 |
public string Property(EdmProperty edmProperty) |
|
179 |
{ |
|
180 |
return string.Format( |
|
181 |
CultureInfo.InvariantCulture, |
|
182 |
"{0} {1} {2} {{ {3}get; {4}set; }}", |
|
183 |
Accessibility.ForProperty(edmProperty), |
|
184 |
_typeMapper.GetTypeName(edmProperty.TypeUsage), |
|
185 |
_code.Escape(edmProperty), |
|
186 |
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)), |
|
187 |
_code.SpaceAfter(Accessibility.ForSetter(edmProperty))); |
|
188 |
} |
|
189 |
|
|
190 |
public string NavigationProperty(NavigationProperty navProp) |
|
191 |
{ |
|
192 |
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType()); |
|
193 |
return string.Format( |
|
194 |
CultureInfo.InvariantCulture, |
|
195 |
"{0} {1} {2} {{ {3}get; {4}set; }}", |
|
196 |
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)), |
|
197 |
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType, |
|
198 |
_code.Escape(navProp), |
|
199 |
_code.SpaceAfter(Accessibility.ForGetter(navProp)), |
|
200 |
_code.SpaceAfter(Accessibility.ForSetter(navProp))); |
|
201 |
} |
|
202 |
|
|
203 |
public string AccessibilityAndVirtual(string accessibility) |
|
204 |
{ |
|
205 |
return accessibility + (accessibility != "private" ? " virtual" : ""); |
|
206 |
} |
|
207 |
|
|
208 |
public string EntityClassOpening(EntityType entity) |
|
209 |
{ |
|
210 |
return string.Format( |
|
211 |
CultureInfo.InvariantCulture, |
|
212 |
"{0} {1}partial class {2}{3}", |
|
213 |
Accessibility.ForType(entity), |
|
214 |
_code.SpaceAfter(_code.AbstractOption(entity)), |
|
215 |
_code.Escape(entity), |
|
216 |
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType))); |
|
217 |
} |
|
218 |
|
|
219 |
public string EnumOpening(SimpleType enumType) |
|
220 |
{ |
|
221 |
return string.Format( |
|
222 |
CultureInfo.InvariantCulture, |
|
223 |
"{0} enum {1} : {2}", |
|
224 |
Accessibility.ForType(enumType), |
|
225 |
_code.Escape(enumType), |
|
226 |
_code.Escape(_typeMapper.UnderlyingClrType(enumType))); |
|
227 |
} |
|
228 |
|
|
229 |
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter) |
|
230 |
{ |
|
231 |
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef); |
|
232 |
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable)) |
|
233 |
{ |
|
234 |
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null"; |
|
235 |
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")"; |
|
236 |
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))"; |
|
237 |
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit); |
|
238 |
} |
|
239 |
} |
|
240 |
|
|
241 |
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace) |
|
242 |
{ |
|
243 |
var parameters = _typeMapper.GetParameters(edmFunction); |
|
244 |
|
|
245 |
return string.Format( |
|
246 |
CultureInfo.InvariantCulture, |
|
247 |
"{0} IQueryable<{1}> {2}({3})", |
|
248 |
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), |
|
249 |
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), |
|
250 |
_code.Escape(edmFunction), |
|
251 |
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray())); |
|
252 |
} |
|
253 |
|
|
254 |
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace) |
|
255 |
{ |
|
256 |
var parameters = _typeMapper.GetParameters(edmFunction); |
|
257 |
|
|
258 |
return string.Format( |
|
259 |
CultureInfo.InvariantCulture, |
|
260 |
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});", |
|
261 |
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace), |
|
262 |
edmFunction.NamespaceName, |
|
263 |
edmFunction.Name, |
|
264 |
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()), |
|
265 |
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()))); |
|
266 |
} |
|
267 |
|
|
268 |
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) |
|
269 |
{ |
|
270 |
var parameters = _typeMapper.GetParameters(edmFunction); |
|
271 |
var returnType = _typeMapper.GetReturnType(edmFunction); |
|
272 |
|
|
273 |
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()); |
|
274 |
if (includeMergeOption) |
|
275 |
{ |
|
276 |
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption"; |
|
277 |
} |
|
278 |
|
|
279 |
return string.Format( |
|
280 |
CultureInfo.InvariantCulture, |
|
281 |
"{0} {1} {2}({3})", |
|
282 |
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)), |
|
283 |
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", |
|
284 |
_code.Escape(edmFunction), |
|
285 |
paramList); |
|
286 |
} |
|
287 |
|
|
288 |
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption) |
|
289 |
{ |
|
290 |
var parameters = _typeMapper.GetParameters(edmFunction); |
|
291 |
var returnType = _typeMapper.GetReturnType(edmFunction); |
|
292 |
|
|
293 |
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())); |
|
294 |
if (includeMergeOption) |
|
295 |
{ |
|
296 |
callParams = ", mergeOption" + callParams; |
|
297 |
} |
|
298 |
|
|
299 |
return string.Format( |
|
300 |
CultureInfo.InvariantCulture, |
|
301 |
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});", |
|
302 |
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">", |
|
303 |
edmFunction.Name, |
|
304 |
callParams); |
|
305 |
} |
|
306 |
|
|
307 |
public string DbSet(EntitySet entitySet) |
|
308 |
{ |
|
309 |
return string.Format( |
|
310 |
CultureInfo.InvariantCulture, |
|
311 |
"{0} virtual DbSet<{1}> {2} {{ get; set; }}", |
|
312 |
Accessibility.ForReadOnlyProperty(entitySet), |
|
313 |
_typeMapper.GetTypeName(entitySet.ElementType), |
|
314 |
_code.Escape(entitySet)); |
|
315 |
} |
|
316 |
|
|
317 |
public string DbSetInitializer(EntitySet entitySet) |
|
318 |
{ |
|
319 |
return string.Format( |
|
320 |
CultureInfo.InvariantCulture, |
|
321 |
"{0} = Set<{1}>();", |
|
322 |
_code.Escape(entitySet), |
|
323 |
_typeMapper.GetTypeName(entitySet.ElementType)); |
|
324 |
} |
|
325 |
|
|
326 |
public string UsingDirectives(bool inHeader, bool includeCollections = true) |
|
327 |
{ |
|
328 |
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion()) |
|
329 |
? string.Format( |
|
330 |
CultureInfo.InvariantCulture, |
|
331 |
"{0}using System;{1}" + |
|
332 |
"{2}", |
|
333 |
inHeader ? Environment.NewLine : "", |
|
334 |
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "", |
|
335 |
inHeader ? "" : Environment.NewLine) |
|
336 |
: ""; |
|
337 |
} |
|
338 |
} |
|
339 |
|
|
340 |
public class TypeMapper |
|
341 |
{ |
|
342 |
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName"; |
|
343 |
|
|
344 |
private readonly System.Collections.IList _errors; |
|
345 |
private readonly CodeGenerationTools _code; |
|
346 |
private readonly MetadataTools _ef; |
|
347 |
|
|
348 |
public static string FixNamespaces(string typeName) |
|
349 |
{ |
|
350 |
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial."); |
|
351 |
} |
|
352 |
|
|
353 |
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors) |
|
354 |
{ |
|
355 |
ArgumentNotNull(code, "code"); |
|
356 |
ArgumentNotNull(ef, "ef"); |
|
357 |
ArgumentNotNull(errors, "errors"); |
|
358 |
|
|
359 |
_code = code; |
|
360 |
_ef = ef; |
|
361 |
_errors = errors; |
|
362 |
} |
|
363 |
|
|
364 |
public string GetTypeName(TypeUsage typeUsage) |
|
365 |
{ |
|
366 |
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null); |
|
367 |
} |
|
368 |
|
|
369 |
public string GetTypeName(EdmType edmType) |
|
370 |
{ |
|
371 |
return GetTypeName(edmType, isNullable: null, modelNamespace: null); |
|
372 |
} |
|
373 |
|
|
374 |
public string GetTypeName(TypeUsage typeUsage, string modelNamespace) |
|
375 |
{ |
|
376 |
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace); |
|
377 |
} |
|
378 |
|
|
379 |
public string GetTypeName(EdmType edmType, string modelNamespace) |
내보내기 Unified diff