
'------------------------------------------------------------------------------
' <auto-generated>
'    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.
' </auto-generated>
'------------------------------------------------------------------------------

Imports System
Imports System.ComponentModel
Imports System.Data.EntityClient
Imports System.Data.Objects
Imports System.Data.Objects.DataClasses
Imports System.Linq
Imports System.Runtime.Serialization
Imports System.Xml.Serialization
Imports System.Data.Entity.Core.Objects
Imports System.Data.Entity.Core.Objects.DataClasses
Imports System.Data.Entity.Core.EntityClient

<Assembly: EdmSchemaAttribute("92d4c97b-8bcf-4452-9850-4606e6f580b4")> 
#Region "EDM Relationship Metadata"
'<Assembly: EdmRelationshipAttribute("PlanetWroxModel", "FK_Review_Genre", "Genre", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(PlanetWroxModel.Genre), "Review", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(PlanetWroxModel.Review), True)> 
'<Assembly: EdmRelationshipAttribute("PlanetWroxModel", "FK_Picture_PhotoAlbum", "PhotoAlbum", System.Data.Metadata.Edm.RelationshipMultiplicity.One, GetType(PlanetWroxModel.PhotoAlbum), "Picture", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, GetType(PlanetWroxModel.Picture), True)> 

#End Region

Namespace PlanetWroxModel

#Region "Contexts"

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    Partial Public Class PlanetWroxEntities
        Inherits ObjectContext

#Region "Constructors"

        ''' <summary>
        ''' Initializes a new PlanetWroxEntities object using the connection string found in the 'PlanetWroxEntities' section of the application configuration file.
        ''' </summary>
        Public Sub New()
            MyBase.New("name=PlanetWroxEntities", "PlanetWroxEntities")
            MyBase.ContextOptions.LazyLoadingEnabled = True
            OnContextCreated()
        End Sub

        ''' <summary>
        ''' Initialize a new PlanetWroxEntities object.
        ''' </summary>
        Public Sub New(ByVal connectionString As String)
            MyBase.New(connectionString, "PlanetWroxEntities")
            MyBase.ContextOptions.LazyLoadingEnabled = True
            OnContextCreated()
        End Sub

        ''' <summary>
        ''' Initialize a new PlanetWroxEntities object.
        ''' </summary>
        Public Sub New(ByVal connection As EntityConnection)
            MyBase.New(connection, "PlanetWroxEntities")
            MyBase.ContextOptions.LazyLoadingEnabled = True
            OnContextCreated()
        End Sub

#End Region

#Region "Partial Methods"

        Partial Private Sub OnContextCreated()
        End Sub

#End Region

#Region "ObjectSet Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        Public ReadOnly Property Genres() As ObjectSet(Of Genre)
            Get
                If (_Genres Is Nothing) Then
                    _Genres = MyBase.CreateObjectSet(Of Genre)("Genres")
                End If
                Return _Genres
            End Get
        End Property

        Private _Genres As ObjectSet(Of Genre)

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        Public ReadOnly Property Reviews() As ObjectSet(Of Review)
            Get
                If (_Reviews Is Nothing) Then
                    _Reviews = MyBase.CreateObjectSet(Of Review)("Reviews")
                End If
                Return _Reviews
            End Get
        End Property

        Private _Reviews As ObjectSet(Of Review)

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        Public ReadOnly Property PhotoAlbums() As ObjectSet(Of PhotoAlbum)
            Get
                If (_PhotoAlbums Is Nothing) Then
                    _PhotoAlbums = MyBase.CreateObjectSet(Of PhotoAlbum)("PhotoAlbums")
                End If
                Return _PhotoAlbums
            End Get
        End Property

        Private _PhotoAlbums As ObjectSet(Of PhotoAlbum)

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        Public ReadOnly Property Pictures() As ObjectSet(Of Picture)
            Get
                If (_Pictures Is Nothing) Then
                    _Pictures = MyBase.CreateObjectSet(Of Picture)("Pictures")
                End If
                Return _Pictures
            End Get
        End Property

        Private _Pictures As ObjectSet(Of Picture)

#End Region

#Region "AddTo Methods"

        ''' <summary>
        ''' Deprecated Method for adding a new object to the Genres EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
        ''' </summary>
        Public Sub AddToGenres(ByVal genre As Genre)
            MyBase.AddObject("Genres", genre)
        End Sub

        ''' <summary>
        ''' Deprecated Method for adding a new object to the Reviews EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
        ''' </summary>
        Public Sub AddToReviews(ByVal review As Review)
            MyBase.AddObject("Reviews", review)
        End Sub

        ''' <summary>
        ''' Deprecated Method for adding a new object to the PhotoAlbums EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
        ''' </summary>
        Public Sub AddToPhotoAlbums(ByVal photoAlbum As PhotoAlbum)
            MyBase.AddObject("PhotoAlbums", photoAlbum)
        End Sub

        ''' <summary>
        ''' Deprecated Method for adding a new object to the Pictures EntitySet. Consider using the .Add method of the associated ObjectSet(Of T) property instead.
        ''' </summary>
        Public Sub AddToPictures(ByVal picture As Picture)
            MyBase.AddObject("Pictures", picture)
        End Sub

#End Region

    End Class

#End Region

#Region "Entities"

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmEntityTypeAttribute(NamespaceName:="PlanetWroxModel", Name:="Genre")>
    <Serializable()>
    <DataContractAttribute(IsReference:=True)>
    Partial Public Class Genre
        Inherits EntityObject
#Region "Factory Method"

        ''' <summary>
        ''' Create a new Genre object.
        ''' </summary>
        ''' <param name="id">Initial value of the Id property.</param>
        ''' <param name="name">Initial value of the Name property.</param>
        ''' <param name="sortOrder">Initial value of the SortOrder property.</param>
        Public Shared Function CreateGenre(id As Global.System.Int32, name As Global.System.String, sortOrder As Global.System.Int32) As Genre
            Dim genre As Genre = New Genre
            genre.Id = id
            genre.Name = name
            genre.SortOrder = sortOrder
            Return genre
        End Function

#End Region

#Region "Simple Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=True, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Id() As Global.System.Int32
            Get
                Return _Id
            End Get
            Set(value As Global.System.Int32)
                If (_Id <> value) Then
                    OnIdChanging(value)
                    ReportPropertyChanging("Id")
                    _Id = StructuralObject.SetValidValue(value, "Id")
                    ReportPropertyChanged("Id")
                    OnIdChanged()
                End If
            End Set
        End Property

        Private _Id As Global.System.Int32
        Partial Private Sub OnIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnIdChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Name() As Global.System.String
            Get
                Return _Name
            End Get
            Set(value As Global.System.String)
                OnNameChanging(value)
                ReportPropertyChanging("Name")
                _Name = StructuralObject.SetValidValue(value, False, "Name")
                ReportPropertyChanged("Name")
                OnNameChanged()
            End Set
        End Property

        Private _Name As Global.System.String
        Partial Private Sub OnNameChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnNameChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property SortOrder() As Global.System.Int32
            Get
                Return _SortOrder
            End Get
            Set(value As Global.System.Int32)
                OnSortOrderChanging(value)
                ReportPropertyChanging("SortOrder")
                _SortOrder = StructuralObject.SetValidValue(value, "SortOrder")
                ReportPropertyChanged("SortOrder")
                OnSortOrderChanged()
            End Set
        End Property

        Private _SortOrder As Global.System.Int32
        Partial Private Sub OnSortOrderChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnSortOrderChanged()
        End Sub

#End Region

#Region "Navigation Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <XmlIgnoreAttribute()>
        <SoapIgnoreAttribute()>
        <DataMemberAttribute()>
        <EdmRelationshipNavigationPropertyAttribute("PlanetWroxModel", "FK_Review_Genre", "Review")>
        Public Property Reviews() As EntityCollection(Of Review)
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Review)("PlanetWroxModel.FK_Review_Genre", "Review")
            End Get
            Set(value As EntityCollection(Of Review))
                If (Not value Is Nothing) Then
                    CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Review)("PlanetWroxModel.FK_Review_Genre", "Review", value)
                End If
            End Set
        End Property

#End Region

    End Class

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmEntityTypeAttribute(NamespaceName:="PlanetWroxModel", Name:="PhotoAlbum")>
    <Serializable()>
    <DataContractAttribute(IsReference:=True)>
    Partial Public Class PhotoAlbum
        Inherits EntityObject
#Region "Factory Method"

        ''' <summary>
        ''' Create a new PhotoAlbum object.
        ''' </summary>
        ''' <param name="id">Initial value of the Id property.</param>
        ''' <param name="name">Initial value of the Name property.</param>
        Public Shared Function CreatePhotoAlbum(id As Global.System.Int32, name As Global.System.String) As PhotoAlbum
            Dim photoAlbum As PhotoAlbum = New PhotoAlbum
            photoAlbum.Id = id
            photoAlbum.Name = name
            Return photoAlbum
        End Function

#End Region

#Region "Simple Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=True, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Id() As Global.System.Int32
            Get
                Return _Id
            End Get
            Set(value As Global.System.Int32)
                If (_Id <> value) Then
                    OnIdChanging(value)
                    ReportPropertyChanging("Id")
                    _Id = StructuralObject.SetValidValue(value, "Id")
                    ReportPropertyChanged("Id")
                    OnIdChanged()
                End If
            End Set
        End Property

        Private _Id As Global.System.Int32
        Partial Private Sub OnIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnIdChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Name() As Global.System.String
            Get
                Return _Name
            End Get
            Set(value As Global.System.String)
                OnNameChanging(value)
                ReportPropertyChanging("Name")
                _Name = StructuralObject.SetValidValue(value, False, "Name")
                ReportPropertyChanged("Name")
                OnNameChanged()
            End Set
        End Property

        Private _Name As Global.System.String
        Partial Private Sub OnNameChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnNameChanged()
        End Sub

#End Region

#Region "Navigation Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <XmlIgnoreAttribute()>
        <SoapIgnoreAttribute()>
        <DataMemberAttribute()>
        <EdmRelationshipNavigationPropertyAttribute("PlanetWroxModel", "FK_Picture_PhotoAlbum", "Picture")>
        Public Property Pictures() As EntityCollection(Of Picture)
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedCollection(Of Picture)("PlanetWroxModel.FK_Picture_PhotoAlbum", "Picture")
            End Get
            Set(value As EntityCollection(Of Picture))
                If (Not value Is Nothing) Then
                    CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedCollection(Of Picture)("PlanetWroxModel.FK_Picture_PhotoAlbum", "Picture", value)
                End If
            End Set
        End Property

#End Region

    End Class

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmEntityTypeAttribute(NamespaceName:="PlanetWroxModel", Name:="Picture")>
    <Serializable()>
    <DataContractAttribute(IsReference:=True)>
    Partial Public Class Picture
        Inherits EntityObject
#Region "Factory Method"

        ''' <summary>
        ''' Create a new Picture object.
        ''' </summary>
        ''' <param name="id">Initial value of the Id property.</param>
        ''' <param name="description">Initial value of the Description property.</param>
        ''' <param name="toolTip">Initial value of the ToolTip property.</param>
        ''' <param name="imageUrl">Initial value of the ImageUrl property.</param>
        ''' <param name="photoAlbumId">Initial value of the PhotoAlbumId property.</param>
        Public Shared Function CreatePicture(id As Global.System.Int32, description As Global.System.String, toolTip As Global.System.String, imageUrl As Global.System.String, photoAlbumId As Global.System.Int32) As Picture
            Dim picture As Picture = New Picture
            picture.Id = id
            picture.Description = description
            picture.ToolTip = toolTip
            picture.ImageUrl = imageUrl
            picture.PhotoAlbumId = photoAlbumId
            Return picture
        End Function

#End Region

#Region "Simple Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=True, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Id() As Global.System.Int32
            Get
                Return _Id
            End Get
            Set(value As Global.System.Int32)
                If (_Id <> value) Then
                    OnIdChanging(value)
                    ReportPropertyChanging("Id")
                    _Id = StructuralObject.SetValidValue(value, "Id")
                    ReportPropertyChanged("Id")
                    OnIdChanged()
                End If
            End Set
        End Property

        Private _Id As Global.System.Int32
        Partial Private Sub OnIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnIdChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Description() As Global.System.String
            Get
                Return _Description
            End Get
            Set(value As Global.System.String)
                OnDescriptionChanging(value)
                ReportPropertyChanging("Description")
                _Description = StructuralObject.SetValidValue(value, False, "Description")
                ReportPropertyChanged("Description")
                OnDescriptionChanged()
            End Set
        End Property

        Private _Description As Global.System.String
        Partial Private Sub OnDescriptionChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnDescriptionChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property ToolTip() As Global.System.String
            Get
                Return _ToolTip
            End Get
            Set(value As Global.System.String)
                OnToolTipChanging(value)
                ReportPropertyChanging("ToolTip")
                _ToolTip = StructuralObject.SetValidValue(value, False, "ToolTip")
                ReportPropertyChanged("ToolTip")
                OnToolTipChanged()
            End Set
        End Property

        Private _ToolTip As Global.System.String
        Partial Private Sub OnToolTipChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnToolTipChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property ImageUrl() As Global.System.String
            Get
                Return _ImageUrl
            End Get
            Set(value As Global.System.String)
                OnImageUrlChanging(value)
                ReportPropertyChanging("ImageUrl")
                _ImageUrl = StructuralObject.SetValidValue(value, False, "ImageUrl")
                ReportPropertyChanged("ImageUrl")
                OnImageUrlChanged()
            End Set
        End Property

        Private _ImageUrl As Global.System.String
        Partial Private Sub OnImageUrlChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnImageUrlChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property PhotoAlbumId() As Global.System.Int32
            Get
                Return _PhotoAlbumId
            End Get
            Set(value As Global.System.Int32)
                OnPhotoAlbumIdChanging(value)
                ReportPropertyChanging("PhotoAlbumId")
                _PhotoAlbumId = StructuralObject.SetValidValue(value, "PhotoAlbumId")
                ReportPropertyChanged("PhotoAlbumId")
                OnPhotoAlbumIdChanged()
            End Set
        End Property

        Private _PhotoAlbumId As Global.System.Int32
        Partial Private Sub OnPhotoAlbumIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnPhotoAlbumIdChanged()
        End Sub

#End Region

#Region "Navigation Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <XmlIgnoreAttribute()>
        <SoapIgnoreAttribute()>
        <DataMemberAttribute()>
        <EdmRelationshipNavigationPropertyAttribute("PlanetWroxModel", "FK_Picture_PhotoAlbum", "PhotoAlbum")>
        Public Property PhotoAlbum() As PhotoAlbum
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of PhotoAlbum)("PlanetWroxModel.FK_Picture_PhotoAlbum", "PhotoAlbum").Value
            End Get
            Set(value As PhotoAlbum)
                CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of PhotoAlbum)("PlanetWroxModel.FK_Picture_PhotoAlbum", "PhotoAlbum").Value = value
            End Set
        End Property
        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <BrowsableAttribute(False)>
        <DataMemberAttribute()>
        Public Property PhotoAlbumReference() As EntityReference(Of PhotoAlbum)
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of PhotoAlbum)("PlanetWroxModel.FK_Picture_PhotoAlbum", "PhotoAlbum")
            End Get
            Set(value As EntityReference(Of PhotoAlbum))
                If (Not value Is Nothing) Then
                    CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of PhotoAlbum)("PlanetWroxModel.FK_Picture_PhotoAlbum", "PhotoAlbum", value)
                End If
            End Set
        End Property

#End Region

    End Class

    ''' <summary>
    ''' No Metadata Documentation available.
    ''' </summary>
    <EdmEntityTypeAttribute(NamespaceName:="PlanetWroxModel", Name:="Review")>
    <Serializable()>
    <DataContractAttribute(IsReference:=True)>
    Partial Public Class Review
        Inherits EntityObject
#Region "Factory Method"

        ''' <summary>
        ''' Create a new Review object.
        ''' </summary>
        ''' <param name="id">Initial value of the Id property.</param>
        ''' <param name="title">Initial value of the Title property.</param>
        ''' <param name="summary">Initial value of the Summary property.</param>
        ''' <param name="genreId">Initial value of the GenreId property.</param>
        ''' <param name="authorized">Initial value of the Authorized property.</param>
        ''' <param name="createDateTime">Initial value of the CreateDateTime property.</param>
        ''' <param name="updateDateTime">Initial value of the UpdateDateTime property.</param>
        Public Shared Function CreateReview(id As Global.System.Int32, title As Global.System.String, summary As Global.System.String, genreId As Global.System.Int32, authorized As Global.System.Boolean, createDateTime As Global.System.DateTime, updateDateTime As Global.System.DateTime) As Review
            Dim review As Review = New Review
            review.Id = id
            review.Title = title
            review.Summary = summary
            review.GenreId = genreId
            review.Authorized = authorized
            review.CreateDateTime = createDateTime
            review.UpdateDateTime = updateDateTime
            Return review
        End Function

#End Region

#Region "Simple Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=True, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Id() As Global.System.Int32
            Get
                Return _Id
            End Get
            Set(value As Global.System.Int32)
                If (_Id <> value) Then
                    OnIdChanging(value)
                    ReportPropertyChanging("Id")
                    _Id = StructuralObject.SetValidValue(value, "Id")
                    ReportPropertyChanged("Id")
                    OnIdChanged()
                End If
            End Set
        End Property

        Private _Id As Global.System.Int32
        Partial Private Sub OnIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnIdChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Title() As Global.System.String
            Get
                Return _Title
            End Get
            Set(value As Global.System.String)
                OnTitleChanging(value)
                ReportPropertyChanging("Title")
                _Title = StructuralObject.SetValidValue(value, False, "Title")
                ReportPropertyChanged("Title")
                OnTitleChanged()
            End Set
        End Property

        Private _Title As Global.System.String
        Partial Private Sub OnTitleChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnTitleChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Summary() As Global.System.String
            Get
                Return _Summary
            End Get
            Set(value As Global.System.String)
                OnSummaryChanging(value)
                ReportPropertyChanging("Summary")
                _Summary = StructuralObject.SetValidValue(value, False, "Summary")
                ReportPropertyChanged("Summary")
                OnSummaryChanged()
            End Set
        End Property

        Private _Summary As Global.System.String
        Partial Private Sub OnSummaryChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnSummaryChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=True)>
        <DataMemberAttribute()>
        Public Property Body() As Global.System.String
            Get
                Return _Body
            End Get
            Set(value As Global.System.String)
                OnBodyChanging(value)
                ReportPropertyChanging("Body")
                _Body = StructuralObject.SetValidValue(value, True, "Body")
                ReportPropertyChanged("Body")
                OnBodyChanged()
            End Set
        End Property

        Private _Body As Global.System.String
        Partial Private Sub OnBodyChanging(value As Global.System.String)
        End Sub

        Partial Private Sub OnBodyChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property GenreId() As Global.System.Int32
            Get
                Return _GenreId
            End Get
            Set(value As Global.System.Int32)
                OnGenreIdChanging(value)
                ReportPropertyChanging("GenreId")
                _GenreId = StructuralObject.SetValidValue(value, "GenreId")
                ReportPropertyChanged("GenreId")
                OnGenreIdChanged()
            End Set
        End Property

        Private _GenreId As Global.System.Int32
        Partial Private Sub OnGenreIdChanging(value As Global.System.Int32)
        End Sub

        Partial Private Sub OnGenreIdChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property Authorized() As Global.System.Boolean
            Get
                Return _Authorized
            End Get
            Set(value As Global.System.Boolean)
                OnAuthorizedChanging(value)
                ReportPropertyChanging("Authorized")
                _Authorized = StructuralObject.SetValidValue(value, "Authorized")
                ReportPropertyChanged("Authorized")
                OnAuthorizedChanged()
            End Set
        End Property

        Private _Authorized As Global.System.Boolean
        Partial Private Sub OnAuthorizedChanging(value As Global.System.Boolean)
        End Sub

        Partial Private Sub OnAuthorizedChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property CreateDateTime() As Global.System.DateTime
            Get
                Return _CreateDateTime
            End Get
            Set(value As Global.System.DateTime)
                OnCreateDateTimeChanging(value)
                ReportPropertyChanging("CreateDateTime")
                _CreateDateTime = StructuralObject.SetValidValue(value, "CreateDateTime")
                ReportPropertyChanged("CreateDateTime")
                OnCreateDateTimeChanged()
            End Set
        End Property

        Private _CreateDateTime As Global.System.DateTime
        Partial Private Sub OnCreateDateTimeChanging(value As Global.System.DateTime)
        End Sub

        Partial Private Sub OnCreateDateTimeChanged()
        End Sub

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <EdmScalarPropertyAttribute(EntityKeyProperty:=False, IsNullable:=False)>
        <DataMemberAttribute()>
        Public Property UpdateDateTime() As Global.System.DateTime
            Get
                Return _UpdateDateTime
            End Get
            Set(value As Global.System.DateTime)
                OnUpdateDateTimeChanging(value)
                ReportPropertyChanging("UpdateDateTime")
                _UpdateDateTime = StructuralObject.SetValidValue(value, "UpdateDateTime")
                ReportPropertyChanged("UpdateDateTime")
                OnUpdateDateTimeChanged()
            End Set
        End Property

        Private _UpdateDateTime As Global.System.DateTime
        Partial Private Sub OnUpdateDateTimeChanging(value As Global.System.DateTime)
        End Sub

        Partial Private Sub OnUpdateDateTimeChanged()
        End Sub

#End Region

#Region "Navigation Properties"

        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <XmlIgnoreAttribute()>
        <SoapIgnoreAttribute()>
        <DataMemberAttribute()>
        <EdmRelationshipNavigationPropertyAttribute("PlanetWroxModel", "FK_Review_Genre", "Genre")>
        Public Property Genre() As Genre
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Genre)("PlanetWroxModel.FK_Review_Genre", "Genre").Value
            End Get
            Set(value As Genre)
                CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Genre)("PlanetWroxModel.FK_Review_Genre", "Genre").Value = value
            End Set
        End Property
        ''' <summary>
        ''' No Metadata Documentation available.
        ''' </summary>
        <BrowsableAttribute(False)>
        <DataMemberAttribute()>
        Public Property GenreReference() As EntityReference(Of Genre)
            Get
                Return CType(Me, IEntityWithRelationships).RelationshipManager.GetRelatedReference(Of Genre)("PlanetWroxModel.FK_Review_Genre", "Genre")
            End Get
            Set(value As EntityReference(Of Genre))
                If (Not value Is Nothing) Then
                    CType(Me, IEntityWithRelationships).RelationshipManager.InitializeRelatedReference(Of Genre)("PlanetWroxModel.FK_Review_Genre", "Genre", value)
                End If
            End Set
        End Property

#End Region

    End Class

#End Region

End Namespace
