//------------------------------------------------------------------------------
//
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;
[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata
[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))]
[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))]
#endregion
namespace Newtonsoft.Json.Tests
{
#region Contexts
///
/// No Metadata Documentation available.
///
public partial class DataServicesTestDatabaseEntities : ObjectContext
{
#region Constructors
///
/// Initializes a new DataServicesTestDatabaseEntities object using the connection string found in the 'DataServicesTestDatabaseEntities' section of the application configuration file.
///
public DataServicesTestDatabaseEntities() : base("name=DataServicesTestDatabaseEntities", "DataServicesTestDatabaseEntities")
{
OnContextCreated();
}
///
/// Initialize a new DataServicesTestDatabaseEntities object.
///
public DataServicesTestDatabaseEntities(string connectionString) : base(connectionString, "DataServicesTestDatabaseEntities")
{
OnContextCreated();
}
///
/// Initialize a new DataServicesTestDatabaseEntities object.
///
public DataServicesTestDatabaseEntities(EntityConnection connection) : base(connection, "DataServicesTestDatabaseEntities")
{
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
///
/// No Metadata Documentation available.
///
public ObjectSet File
{
get
{
if ((_File == null))
{
_File = base.CreateObjectSet("File");
}
return _File;
}
}
private ObjectSet _File;
///
/// No Metadata Documentation available.
///
public ObjectSet Folder
{
get
{
if ((_Folder == null))
{
_Folder = base.CreateObjectSet("Folder");
}
return _Folder;
}
}
private ObjectSet _Folder;
#endregion
#region AddTo Methods
///
/// Deprecated Method for adding a new object to the File EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToFile(File file)
{
base.AddObject("File", file);
}
///
/// Deprecated Method for adding a new object to the Folder EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToFolder(Folder folder)
{
base.AddObject("Folder", folder);
}
#endregion
}
#endregion
#region Entities
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="File")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class File : EntityObject
{
#region Factory Method
///
/// Create a new File object.
///
/// Initial value of the FileId property.
/// Initial value of the Name property.
/// Initial value of the Description property.
/// Initial value of the CreatedDate property.
public static File CreateFile(global::System.Guid fileId, global::System.String name, global::System.String description, global::System.DateTime createdDate)
{
File file = new File();
file.FileId = fileId;
file.Name = name;
file.Description = description;
file.CreatedDate = createdDate;
return file;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Guid FileId
{
get
{
return _FileId;
}
set
{
if (_FileId != value)
{
OnFileIdChanging(value);
ReportPropertyChanging("FileId");
_FileId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("FileId");
OnFileIdChanged();
}
}
}
private global::System.Guid _FileId;
partial void OnFileIdChanging(global::System.Guid value);
partial void OnFileIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Name
{
get
{
return _Name;
}
set
{
OnNameChanging(value);
ReportPropertyChanging("Name");
_Name = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Name");
OnNameChanged();
}
}
private global::System.String _Name;
partial void OnNameChanging(global::System.String value);
partial void OnNameChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Description
{
get
{
return _Description;
}
set
{
OnDescriptionChanging(value);
ReportPropertyChanging("Description");
_Description = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Description");
OnDescriptionChanged();
}
}
private global::System.String _Description;
partial void OnDescriptionChanging(global::System.String value);
partial void OnDescriptionChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreatedDate
{
get
{
return _CreatedDate;
}
set
{
OnCreatedDateChanging(value);
ReportPropertyChanging("CreatedDate");
_CreatedDate = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreatedDate");
OnCreatedDateChanged();
}
}
private global::System.DateTime _CreatedDate;
partial void OnCreatedDateChanging(global::System.DateTime value);
partial void OnCreatedDateChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder")]
public Folder Folder
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value = value;
}
}
///
/// No Metadata Documentation available.
///
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference FolderReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder", value);
}
}
}
#endregion
}
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="Folder")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Folder : EntityObject
{
#region Factory Method
///
/// Create a new Folder object.
///
/// Initial value of the FolderId property.
/// Initial value of the Name property.
/// Initial value of the Description property.
/// Initial value of the CreatedDate property.
public static Folder CreateFolder(global::System.Guid folderId, global::System.String name, global::System.String description, global::System.DateTime createdDate)
{
Folder folder = new Folder();
folder.FolderId = folderId;
folder.Name = name;
folder.Description = description;
folder.CreatedDate = createdDate;
return folder;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Guid FolderId
{
get
{
return _FolderId;
}
set
{
if (_FolderId != value)
{
OnFolderIdChanging(value);
ReportPropertyChanging("FolderId");
_FolderId = StructuralObject.SetValidValue(value);
ReportPropertyChanged("FolderId");
OnFolderIdChanged();
}
}
}
private global::System.Guid _FolderId;
partial void OnFolderIdChanging(global::System.Guid value);
partial void OnFolderIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Name
{
get
{
return _Name;
}
set
{
OnNameChanging(value);
ReportPropertyChanging("Name");
_Name = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Name");
OnNameChanged();
}
}
private global::System.String _Name;
partial void OnNameChanging(global::System.String value);
partial void OnNameChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Description
{
get
{
return _Description;
}
set
{
OnDescriptionChanging(value);
ReportPropertyChanging("Description");
_Description = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Description");
OnDescriptionChanged();
}
}
private global::System.String _Description;
partial void OnDescriptionChanging(global::System.String value);
partial void OnDescriptionChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreatedDate
{
get
{
return _CreatedDate;
}
set
{
OnCreatedDateChanging(value);
ReportPropertyChanging("CreatedDate");
_CreatedDate = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreatedDate");
OnCreatedDateChanged();
}
}
private global::System.DateTime _CreatedDate;
partial void OnCreatedDateChanging(global::System.DateTime value);
partial void OnCreatedDateChanged();
#endregion
#region Navigation Properties
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "File")]
public EntityCollection Files
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File", value);
}
}
}
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder1")]
public EntityCollection ChildFolders
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1", value);
}
}
}
///
/// No Metadata Documentation available.
///
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
[DataMemberAttribute()]
[EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder")]
public Folder ParentFolder
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value;
}
set
{
((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value = value;
}
}
///
/// No Metadata Documentation available.
///
[BrowsableAttribute(false)]
[DataMemberAttribute()]
public EntityReference ParentFolderReference
{
get
{
return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder");
}
set
{
if ((value != null))
{
((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder", value);
}
}
}
#endregion
}
#endregion
}