1 //------------------------------------------------------------------------------
2 // <copyright file="EntityDataSourceState.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       Microsoft
7 // @backupOwner Microsoft
8 //
9 // Temporary storage for properties set via the wizard
10 //------------------------------------------------------------------------------
11 
12 namespace System.Web.UI.Design.WebControls
13 {
14     internal class EntityDataSourceState
15     {
16         private string _connectionString;
17         private string _defaultContainerName;
18         private string _entityTypeFilter;
19         private string _entitySetName;
20         private string _select;
21 
22         public string ConnectionString
23         {
24             get
25             {
26                 if (_connectionString == null)
27                 {
28                     return String.Empty;
29                 }
30                 return _connectionString;
31             }
32             set
33             {
34                 _connectionString = value;
35             }
36         }
37 
38         public string DefaultContainerName
39         {
40             get
41             {
42                 if (_defaultContainerName == null)
43                 {
44                     return String.Empty;
45                 }
46                 return _defaultContainerName;
47             }
48             set
49             {
50                 _defaultContainerName = value;
51             }
52         }
53 
54         public bool EnableDelete
55         {
56             get;
57             set;
58         }
59 
60         public bool EnableInsert
61         {
62             get;
63             set;
64         }
65 
66         public bool EnableUpdate
67         {
68             get;
69             set;
70         }
71 
72         public string EntitySetName
73         {
74             get
75             {
76                 if (_entitySetName == null)
77                 {
78                     return String.Empty;
79                 }
80                 return _entitySetName;
81             }
82             set
83             {
84                 _entitySetName = value;
85             }
86         }
87 
88         public string EntityTypeFilter
89         {
90             get
91             {
92                 if (_entityTypeFilter == null)
93                 {
94                     return String.Empty;
95                 }
96                 return _entityTypeFilter;
97             }
98             set
99             {
100                 _entityTypeFilter = value;
101             }
102         }
103 
104         public string Select
105         {
106             get
107             {
108                 if (_select == null)
109                 {
110                     return String.Empty;
111                 }
112                 return _select;
113             }
114             set
115             {
116                 _select = value;
117             }
118         }
119 
120         public bool EnableFlattening
121         {
122             get;
123             set;
124         }
125     }
126 }
127