1
ļ»æ//------------------------------------------------------------------------------
3
// This code was generated from a template.
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.
8
//------------------------------------------------------------------------------
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;
18
[assembly: EdmSchemaAttribute()]
19
#region EDM Relationship Metadata
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))]
26
namespace Newtonsoft.Json.Tests
31
/// No Metadata Documentation available.
33
public partial class DataServicesTestDatabaseEntities : ObjectContext
38
/// Initializes a new DataServicesTestDatabaseEntities object using the connection string found in the 'DataServicesTestDatabaseEntities' section of the application configuration file.
40
public DataServicesTestDatabaseEntities() : base("name=DataServicesTestDatabaseEntities", "DataServicesTestDatabaseEntities")
46
/// Initialize a new DataServicesTestDatabaseEntities object.
48
public DataServicesTestDatabaseEntities(string connectionString) : base(connectionString, "DataServicesTestDatabaseEntities")
54
/// Initialize a new DataServicesTestDatabaseEntities object.
56
public DataServicesTestDatabaseEntities(EntityConnection connection) : base(connection, "DataServicesTestDatabaseEntities")
63
#region Partial Methods
65
partial void OnContextCreated();
69
#region ObjectSet Properties
72
/// No Metadata Documentation available.
74
public ObjectSet<File> File
80
_File = base.CreateObjectSet<File>("File");
85
private ObjectSet<File> _File;
88
/// No Metadata Documentation available.
90
public ObjectSet<Folder> Folder
94
if ((_Folder == null))
96
_Folder = base.CreateObjectSet<Folder>("Folder");
101
private ObjectSet<Folder> _Folder;
104
#region AddTo Methods
107
/// Deprecated Method for adding a new object to the File EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
109
public void AddToFile(File file)
111
base.AddObject("File", file);
115
/// Deprecated Method for adding a new object to the Folder EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
117
public void AddToFolder(Folder folder)
119
base.AddObject("Folder", folder);
131
/// No Metadata Documentation available.
133
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="File")]
135
[DataContractAttribute(IsReference=true)]
136
public partial class File : EntityObject
138
#region Factory Method
141
/// Create a new File object.
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)
149
File file = new File();
150
file.FileId = fileId;
152
file.Description = description;
153
file.CreatedDate = createdDate;
158
#region Primitive Properties
161
/// No Metadata Documentation available.
163
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
164
[DataMemberAttribute()]
165
public global::System.Guid FileId
173
if (_FileId != value)
175
OnFileIdChanging(value);
176
ReportPropertyChanging("FileId");
177
_FileId = StructuralObject.SetValidValue(value);
178
ReportPropertyChanged("FileId");
183
private global::System.Guid _FileId;
184
partial void OnFileIdChanging(global::System.Guid value);
185
partial void OnFileIdChanged();
188
/// No Metadata Documentation available.
190
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
191
[DataMemberAttribute()]
192
public global::System.String Name
200
OnNameChanging(value);
201
ReportPropertyChanging("Name");
202
_Name = StructuralObject.SetValidValue(value, false);
203
ReportPropertyChanged("Name");
207
private global::System.String _Name;
208
partial void OnNameChanging(global::System.String value);
209
partial void OnNameChanged();
212
/// No Metadata Documentation available.
214
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
215
[DataMemberAttribute()]
216
public global::System.String Description
224
OnDescriptionChanging(value);
225
ReportPropertyChanging("Description");
226
_Description = StructuralObject.SetValidValue(value, false);
227
ReportPropertyChanged("Description");
228
OnDescriptionChanged();
231
private global::System.String _Description;
232
partial void OnDescriptionChanging(global::System.String value);
233
partial void OnDescriptionChanged();
236
/// No Metadata Documentation available.
238
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
239
[DataMemberAttribute()]
240
public global::System.DateTime CreatedDate
248
OnCreatedDateChanging(value);
249
ReportPropertyChanging("CreatedDate");
250
_CreatedDate = StructuralObject.SetValidValue(value);
251
ReportPropertyChanged("CreatedDate");
252
OnCreatedDateChanged();
255
private global::System.DateTime _CreatedDate;
256
partial void OnCreatedDateChanging(global::System.DateTime value);
257
partial void OnCreatedDateChanged();
261
#region Navigation Properties
264
/// No Metadata Documentation available.
266
[XmlIgnoreAttribute()]
267
[SoapIgnoreAttribute()]
268
[DataMemberAttribute()]
269
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder")]
274
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value;
278
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value = value;
282
/// No Metadata Documentation available.
284
[BrowsableAttribute(false)]
285
[DataMemberAttribute()]
286
public EntityReference<Folder> FolderReference
290
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder");
296
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_File_Folder", "Folder", value);
305
/// No Metadata Documentation available.
307
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="Folder")]
309
[DataContractAttribute(IsReference=true)]
310
public partial class Folder : EntityObject
312
#region Factory Method
315
/// Create a new Folder object.
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)
323
Folder folder = new Folder();
324
folder.FolderId = folderId;
326
folder.Description = description;
327
folder.CreatedDate = createdDate;
332
#region Primitive Properties
335
/// No Metadata Documentation available.
337
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
338
[DataMemberAttribute()]
339
public global::System.Guid FolderId
347
if (_FolderId != value)
349
OnFolderIdChanging(value);
350
ReportPropertyChanging("FolderId");
351
_FolderId = StructuralObject.SetValidValue(value);
352
ReportPropertyChanged("FolderId");
357
private global::System.Guid _FolderId;
358
partial void OnFolderIdChanging(global::System.Guid value);
359
partial void OnFolderIdChanged();
362
/// No Metadata Documentation available.
364
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
365
[DataMemberAttribute()]
366
public global::System.String Name
374
OnNameChanging(value);
375
ReportPropertyChanging("Name");
376
_Name = StructuralObject.SetValidValue(value, false);
377
ReportPropertyChanged("Name");
381
private global::System.String _Name;
382
partial void OnNameChanging(global::System.String value);
383
partial void OnNameChanged();
386
/// No Metadata Documentation available.
388
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
389
[DataMemberAttribute()]
390
public global::System.String Description
398
OnDescriptionChanging(value);
399
ReportPropertyChanging("Description");
400
_Description = StructuralObject.SetValidValue(value, false);
401
ReportPropertyChanged("Description");
402
OnDescriptionChanged();
405
private global::System.String _Description;
406
partial void OnDescriptionChanging(global::System.String value);
407
partial void OnDescriptionChanged();
410
/// No Metadata Documentation available.
412
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
413
[DataMemberAttribute()]
414
public global::System.DateTime CreatedDate
422
OnCreatedDateChanging(value);
423
ReportPropertyChanging("CreatedDate");
424
_CreatedDate = StructuralObject.SetValidValue(value);
425
ReportPropertyChanged("CreatedDate");
426
OnCreatedDateChanged();
429
private global::System.DateTime _CreatedDate;
430
partial void OnCreatedDateChanging(global::System.DateTime value);
431
partial void OnCreatedDateChanged();
435
#region Navigation Properties
438
/// No Metadata Documentation available.
440
[XmlIgnoreAttribute()]
441
[SoapIgnoreAttribute()]
442
[DataMemberAttribute()]
443
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "File")]
444
public EntityCollection<File> Files
448
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<File>("DataServicesTestDatabaseModel.FK_File_Folder", "File");
454
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<File>("DataServicesTestDatabaseModel.FK_File_Folder", "File", value);
460
/// No Metadata Documentation available.
462
[XmlIgnoreAttribute()]
463
[SoapIgnoreAttribute()]
464
[DataMemberAttribute()]
465
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder1")]
466
public EntityCollection<Folder> ChildFolders
470
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1");
476
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1", value);
482
/// No Metadata Documentation available.
484
[XmlIgnoreAttribute()]
485
[SoapIgnoreAttribute()]
486
[DataMemberAttribute()]
487
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder")]
488
public Folder ParentFolder
492
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value;
496
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value = value;
500
/// No Metadata Documentation available.
502
[BrowsableAttribute(false)]
503
[DataMemberAttribute()]
504
public EntityReference<Folder> ParentFolderReference
508
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder");
514
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Folder>("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder", value);