root / trunk / Libraries / Json40r2 / Source / Src / Newtonsoft.Json.Tests / FileSystemEntityModel.Designer.cs @ 0eea575a
History | View | Annotate | Download (18.1 kB)
1 |
//------------------------------------------------------------------------------ |
---|---|
2 |
// <auto-generated> |
3 |
// This code was generated from a template. |
4 |
// |
5 |
// Manual changes to this file may cause unexpected behavior in your application. |
6 |
// Manual changes to this file will be overwritten if the code is regenerated. |
7 |
// </auto-generated> |
8 |
//------------------------------------------------------------------------------ |
9 |
|
10 |
using System; |
11 |
using System.Data.Objects; |
12 |
using System.Data.Objects.DataClasses; |
13 |
using System.Data.EntityClient; |
14 |
using System.ComponentModel; |
15 |
using System.Xml.Serialization; |
16 |
using System.Runtime.Serialization; |
17 |
|
18 |
[assembly: EdmSchemaAttribute()] |
19 |
#region EDM Relationship Metadata |
20 |
|
21 |
[assembly: EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(Newtonsoft.Json.Tests.Folder), "File", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.File))] |
22 |
[assembly: EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(Newtonsoft.Json.Tests.Folder), "Folder1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.Folder))] |
23 |
|
24 |
#endregion |
25 |
|
26 |
namespace Newtonsoft.Json.Tests |
27 |
{ |
28 |
#region Contexts |
29 |
|
30 |
/// <summary> |
31 |
/// No Metadata Documentation available. |
32 |
/// </summary> |
33 |
public partial class DataServicesTestDatabaseEntities : ObjectContext |
34 |
{ |
35 |
#region Constructors |
36 |
|
37 |
/// <summary> |
38 |
/// Initializes a new DataServicesTestDatabaseEntities object using the connection string found in the 'DataServicesTestDatabaseEntities' section of the application configuration file. |
39 |
/// </summary> |
40 |
public DataServicesTestDatabaseEntities() : base("name=DataServicesTestDatabaseEntities", "DataServicesTestDatabaseEntities") |
41 |
{ |
42 |
OnContextCreated(); |
43 |
} |
44 |
|
45 |
/// <summary> |
46 |
/// Initialize a new DataServicesTestDatabaseEntities object. |
47 |
/// </summary> |
48 |
public DataServicesTestDatabaseEntities(string connectionString) : base(connectionString, "DataServicesTestDatabaseEntities") |
49 |
{ |
50 |
OnContextCreated(); |
51 |
} |
52 |
|
53 |
/// <summary> |
54 |
/// Initialize a new DataServicesTestDatabaseEntities object. |
55 |
/// </summary> |
56 |
public DataServicesTestDatabaseEntities(EntityConnection connection) : base(connection, "DataServicesTestDatabaseEntities") |
57 |
{ |
58 |
OnContextCreated(); |
59 |
} |
60 |
|
61 |
#endregion |
62 |
|
63 |
#region Partial Methods |
64 |
|
65 |
partial void OnContextCreated(); |
66 |
|
67 |
#endregion |
68 |
|
69 |
#region ObjectSet Properties |
70 |
|
71 |
/// <summary> |
72 |
/// No Metadata Documentation available. |
73 |
/// </summary> |
74 |
public ObjectSet<File> File |
75 |
{ |
76 |
get |
77 |
{ |
78 |
if ((_File == null)) |
79 |
{ |
80 |
_File = base.CreateObjectSet<File>("File"); |
81 |
} |
82 |
return _File; |
83 |
} |
84 |
} |
85 |
private ObjectSet<File> _File; |
86 |
|
87 |
/// <summary> |
88 |
/// No Metadata Documentation available. |
89 |
/// </summary> |
90 |
public ObjectSet<Folder> Folder |
91 |
{ |
92 |
get |
93 |
{ |
94 |
if ((_Folder == null)) |
95 |
{ |
96 |
_Folder = base.CreateObjectSet<Folder>("Folder"); |
97 |
} |
98 |
return _Folder; |
99 |
} |
100 |
} |
101 |
private ObjectSet<Folder> _Folder; |
102 |
|
103 |
#endregion |
104 |
#region AddTo Methods |
105 |
|
106 |
/// <summary> |
107 |
/// Deprecated Method for adding a new object to the File EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. |
108 |
/// </summary> |
109 |
public void AddToFile(File file) |
110 |
{ |
111 |
base.AddObject("File", file); |
112 |
} |
113 |
|
114 |
/// <summary> |
115 |
/// Deprecated Method for adding a new object to the Folder EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. |
116 |
/// </summary> |
117 |
public void AddToFolder(Folder folder) |
118 |
{ |
119 |
base.AddObject("Folder", folder); |
120 |
} |
121 |
|
122 |
#endregion |
123 |
} |
124 |
|
125 |
|
126 |
#endregion |
127 |
|
128 |
#region Entities |
129 |
|
130 |
/// <summary> |
131 |
/// No Metadata Documentation available. |
132 |
/// </summary> |
133 |
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="File")] |
134 |
[Serializable()] |
135 |
[DataContractAttribute(IsReference=true)] |
136 |
public partial class File : EntityObject |
137 |
{ |
138 |
#region Factory Method |
139 |
|
140 |
/// <summary> |
141 |
/// Create a new File object. |
142 |
/// </summary> |
143 |
/// <param name="fileId">Initial value of the FileId property.</param> |
144 |
/// <param name="name">Initial value of the Name property.</param> |
145 |
/// <param name="description">Initial value of the Description property.</param> |
146 |
/// <param name="createdDate">Initial value of the CreatedDate property.</param> |
147 |
public static File CreateFile(global::System.Guid fileId, global::System.String name, global::System.String description, global::System.DateTime createdDate) |
148 |
{ |
149 |
File file = new File(); |
150 |
file.FileId = fileId; |
151 |
file.Name = name; |
152 |
file.Description = description; |
153 |
file.CreatedDate = createdDate; |
154 |
return file; |
155 |
} |
156 |
|
157 |
#endregion |
158 |
#region Primitive Properties |
159 |
|
160 |
/// <summary> |
161 |
/// No Metadata Documentation available. |
162 |
/// </summary> |
163 |
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] |
164 |
[DataMemberAttribute()] |
165 |
public global::System.Guid FileId |
166 |
{ |
167 |
get |
168 |
{ |
169 |
return _FileId; |
170 |
} |
171 |
set |
172 |
{ |
173 |
if (_FileId != value) |
174 |
{ |
175 |
OnFileIdChanging(value); |
176 |
ReportPropertyChanging("FileId"); |
177 |
_FileId = StructuralObject.SetValidValue(value); |
178 |
ReportPropertyChanged("FileId"); |
179 |
OnFileIdChanged(); |
180 |
} |
181 |
} |
182 |
} |
183 |
private global::System.Guid _FileId; |
184 |
partial void OnFileIdChanging(global::System.Guid value); |
185 |
partial void OnFileIdChanged(); |
186 |
|
187 |
/// <summary> |
188 |
/// No Metadata Documentation available. |
189 |
/// </summary> |
190 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
191 |
[DataMemberAttribute()] |
192 |
public global::System.String Name |
193 |
{ |
194 |
get |
195 |
{ |
196 |
return _Name; |
197 |
} |
198 |
set |
199 |
{ |
200 |
OnNameChanging(value); |
201 |
ReportPropertyChanging("Name"); |
202 |
_Name = StructuralObject.SetValidValue(value, false); |
203 |
ReportPropertyChanged("Name"); |
204 |
OnNameChanged(); |
205 |
} |
206 |
} |
207 |
private global::System.String _Name; |
208 |
partial void OnNameChanging(global::System.String value); |
209 |
partial void OnNameChanged(); |
210 |
|
211 |
/// <summary> |
212 |
/// No Metadata Documentation available. |
213 |
/// </summary> |
214 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
215 |
[DataMemberAttribute()] |
216 |
public global::System.String Description |
217 |
{ |
218 |
get |
219 |
{ |
220 |
return _Description; |
221 |
} |
222 |
set |
223 |
{ |
224 |
OnDescriptionChanging(value); |
225 |
ReportPropertyChanging("Description"); |
226 |
_Description = StructuralObject.SetValidValue(value, false); |
227 |
ReportPropertyChanged("Description"); |
228 |
OnDescriptionChanged(); |
229 |
} |
230 |
} |
231 |
private global::System.String _Description; |
232 |
partial void OnDescriptionChanging(global::System.String value); |
233 |
partial void OnDescriptionChanged(); |
234 |
|
235 |
/// <summary> |
236 |
/// No Metadata Documentation available. |
237 |
/// </summary> |
238 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
239 |
[DataMemberAttribute()] |
240 |
public global::System.DateTime CreatedDate |
241 |
{ |
242 |
get |
243 |
{ |
244 |
return _CreatedDate; |
245 |
} |
246 |
set |
247 |
{ |
248 |
OnCreatedDateChanging(value); |
249 |
ReportPropertyChanging("CreatedDate"); |
250 |
_CreatedDate = StructuralObject.SetValidValue(value); |
251 |
ReportPropertyChanged("CreatedDate"); |
252 |
OnCreatedDateChanged(); |
253 |
} |
254 |
} |
255 |
private global::System.DateTime _CreatedDate; |
256 |
partial void OnCreatedDateChanging(global::System.DateTime value); |
257 |
partial void OnCreatedDateChanged(); |
258 |
|
259 |
#endregion |
260 |
|
261 |
#region Navigation Properties |
262 |
|
263 |
/// <summary> |
264 |
/// No Metadata Documentation available. |
265 |
/// </summary> |
266 |
[XmlIgnoreAttribute()] |
267 |
[SoapIgnoreAttribute()] |
268 |
[DataMemberAttribute()] |
269 |
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder")] |
270 |
public Folder Folder |
271 |
{ |
272 |
get |
273 |
{ |
274 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value; |
275 |
} |
276 |
set |
277 |
{ |
278 |
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value = value; |
279 |
} |
280 |
} |
281 |
/// <summary> |
282 |
/// No Metadata Documentation available. |
283 |
/// </summary> |
284 |
[BrowsableAttribute(false)] |
285 |
[DataMemberAttribute()] |
286 |
public EntityReference<Folder> FolderReference |
287 |
{ |
288 |
get |
289 |
{ |
290 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder"); |
291 |
} |
292 |
set |
293 |
{ |
294 |
if ((value != null)) |
295 |
{ |
296 |
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder", value); |
297 |
} |
298 |
} |
299 |
} |
300 |
|
301 |
#endregion |
302 |
} |
303 |
|
304 |
/// <summary> |
305 |
/// No Metadata Documentation available. |
306 |
/// </summary> |
307 |
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="Folder")] |
308 |
[Serializable()] |
309 |
[DataContractAttribute(IsReference=true)] |
310 |
public partial class Folder : EntityObject |
311 |
{ |
312 |
#region Factory Method |
313 |
|
314 |
/// <summary> |
315 |
/// Create a new Folder object. |
316 |
/// </summary> |
317 |
/// <param name="folderId">Initial value of the FolderId property.</param> |
318 |
/// <param name="name">Initial value of the Name property.</param> |
319 |
/// <param name="description">Initial value of the Description property.</param> |
320 |
/// <param name="createdDate">Initial value of the CreatedDate property.</param> |
321 |
public static Folder CreateFolder(global::System.Guid folderId, global::System.String name, global::System.String description, global::System.DateTime createdDate) |
322 |
{ |
323 |
Folder folder = new Folder(); |
324 |
folder.FolderId = folderId; |
325 |
folder.Name = name; |
326 |
folder.Description = description; |
327 |
folder.CreatedDate = createdDate; |
328 |
return folder; |
329 |
} |
330 |
|
331 |
#endregion |
332 |
#region Primitive Properties |
333 |
|
334 |
/// <summary> |
335 |
/// No Metadata Documentation available. |
336 |
/// </summary> |
337 |
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] |
338 |
[DataMemberAttribute()] |
339 |
public global::System.Guid FolderId |
340 |
{ |
341 |
get |
342 |
{ |
343 |
return _FolderId; |
344 |
} |
345 |
set |
346 |
{ |
347 |
if (_FolderId != value) |
348 |
{ |
349 |
OnFolderIdChanging(value); |
350 |
ReportPropertyChanging("FolderId"); |
351 |
_FolderId = StructuralObject.SetValidValue(value); |
352 |
ReportPropertyChanged("FolderId"); |
353 |
OnFolderIdChanged(); |
354 |
} |
355 |
} |
356 |
} |
357 |
private global::System.Guid _FolderId; |
358 |
partial void OnFolderIdChanging(global::System.Guid value); |
359 |
partial void OnFolderIdChanged(); |
360 |
|
361 |
/// <summary> |
362 |
/// No Metadata Documentation available. |
363 |
/// </summary> |
364 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
365 |
[DataMemberAttribute()] |
366 |
public global::System.String Name |
367 |
{ |
368 |
get |
369 |
{ |
370 |
return _Name; |
371 |
} |
372 |
set |
373 |
{ |
374 |
OnNameChanging(value); |
375 |
ReportPropertyChanging("Name"); |
376 |
_Name = StructuralObject.SetValidValue(value, false); |
377 |
ReportPropertyChanged("Name"); |
378 |
OnNameChanged(); |
379 |
} |
380 |
} |
381 |
private global::System.String _Name; |
382 |
partial void OnNameChanging(global::System.String value); |
383 |
partial void OnNameChanged(); |
384 |
|
385 |
/// <summary> |
386 |
/// No Metadata Documentation available. |
387 |
/// </summary> |
388 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
389 |
[DataMemberAttribute()] |
390 |
public global::System.String Description |
391 |
{ |
392 |
get |
393 |
{ |
394 |
return _Description; |
395 |
} |
396 |
set |
397 |
{ |
398 |
OnDescriptionChanging(value); |
399 |
ReportPropertyChanging("Description"); |
400 |
_Description = StructuralObject.SetValidValue(value, false); |
401 |
ReportPropertyChanged("Description"); |
402 |
OnDescriptionChanged(); |
403 |
} |
404 |
} |
405 |
private global::System.String _Description; |
406 |
partial void OnDescriptionChanging(global::System.String value); |
407 |
partial void OnDescriptionChanged(); |
408 |
|
409 |
/// <summary> |
410 |
/// No Metadata Documentation available. |
411 |
/// </summary> |
412 |
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] |
413 |
[DataMemberAttribute()] |
414 |
public global::System.DateTime CreatedDate |
415 |
{ |
416 |
get |
417 |
{ |
418 |
return _CreatedDate; |
419 |
} |
420 |
set |
421 |
{ |
422 |
OnCreatedDateChanging(value); |
423 |
ReportPropertyChanging("CreatedDate"); |
424 |
_CreatedDate = StructuralObject.SetValidValue(value); |
425 |
ReportPropertyChanged("CreatedDate"); |
426 |
OnCreatedDateChanged(); |
427 |
} |
428 |
} |
429 |
private global::System.DateTime _CreatedDate; |
430 |
partial void OnCreatedDateChanging(global::System.DateTime value); |
431 |
partial void OnCreatedDateChanged(); |
432 |
|
433 |
#endregion |
434 |
|
435 |
#region Navigation Properties |
436 |
|
437 |
/// <summary> |
438 |
/// No Metadata Documentation available. |
439 |
/// </summary> |
440 |
[XmlIgnoreAttribute()] |
441 |
[SoapIgnoreAttribute()] |
442 |
[DataMemberAttribute()] |
443 |
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "File")] |
444 |
public EntityCollection<File> Files |
445 |
{ |
446 |
get |
447 |
{ |
448 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<File>("DataServicesTestDatabaseModel.FK_File_Folder", "File"); |
449 |
} |
450 |
set |
451 |
{ |
452 |
if ((value != null)) |
453 |
{ |
454 |
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<File>("DataServicesTestDatabaseModel.FK_File_Folder", "File", value); |
455 |
} |
456 |
} |
457 |
} |
458 |
|
459 |
/// <summary> |
460 |
/// No Metadata Documentation available. |
461 |
/// </summary> |
462 |
[XmlIgnoreAttribute()] |
463 |
[SoapIgnoreAttribute()] |
464 |
[DataMemberAttribute()] |
465 |
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder1")] |
466 |
public EntityCollection<Folder> ChildFolders |
467 |
{ |
468 |
get |
469 |
{ |
470 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1"); |
471 |
} |
472 |
set |
473 |
{ |
474 |
if ((value != null)) |
475 |
{ |
476 |
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1", value); |
477 |
} |
478 |
} |
479 |
} |
480 |
|
481 |
/// <summary> |
482 |
/// No Metadata Documentation available. |
483 |
/// </summary> |
484 |
[XmlIgnoreAttribute()] |
485 |
[SoapIgnoreAttribute()] |
486 |
[DataMemberAttribute()] |
487 |
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder")] |
488 |
public Folder ParentFolder |
489 |
{ |
490 |
get |
491 |
{ |
492 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value; |
493 |
} |
494 |
set |
495 |
{ |
496 |
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value = value; |
497 |
} |
498 |
} |
499 |
/// <summary> |
500 |
/// No Metadata Documentation available. |
501 |
/// </summary> |
502 |
[BrowsableAttribute(false)] |
503 |
[DataMemberAttribute()] |
504 |
public EntityReference<Folder> ParentFolderReference |
505 |
{ |
506 |
get |
507 |
{ |
508 |
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder"); |
509 |
} |
510 |
set |
511 |
{ |
512 |
if ((value != null)) |
513 |
{ |
514 |
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder", value); |
515 |
} |
516 |
} |
517 |
} |
518 |
|
519 |
#endregion |
520 |
} |
521 |
|
522 |
#endregion |
523 |
|
524 |
} |