'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:4.0.30319.1
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.Linq
Imports System.Linq.Expressions
Imports System.Reflection


<Global.System.Data.Linq.Mapping.DatabaseAttribute(Name:="Megacities")>  _
Partial Public Class MegacitiesDataContext
	Inherits System.Data.Linq.DataContext
	
	Private Shared mappingSource As System.Data.Linq.Mapping.MappingSource = New AttributeMappingSource()
	
  #Region "Extensibility Method Definitions"
  Partial Private Sub OnCreated()
  End Sub
  #End Region
	
	Public Sub New()
		MyBase.New(Global.System.Configuration.ConfigurationManager.ConnectionStrings("MegacitiesConnectionString").ConnectionString, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As String, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public Sub New(ByVal connection As System.Data.IDbConnection, ByVal mappingSource As System.Data.Linq.Mapping.MappingSource)
		MyBase.New(connection, mappingSource)
		OnCreated
	End Sub
	
	Public ReadOnly Property Cities() As System.Data.Linq.Table(Of City)
		Get
			Return Me.GetTable(Of City)
		End Get
	End Property
	
	Public ReadOnly Property Countries() As System.Data.Linq.Table(Of Country)
		Get
			Return Me.GetTable(Of Country)
		End Get
	End Property
End Class

<Global.System.Data.Linq.Mapping.TableAttribute(Name:="dbo.Cities")>  _
Partial Public Class City
	
	Private _name As String
	
	Private _country As String
	
	Private _pop2010 As System.Nullable(Of Double)
	
	Private _pop2015 As System.Nullable(Of Double)
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_name", DbType:="VarChar(MAX) NOT NULL", CanBeNull:=false)>  _
	Public Property name() As String
		Get
			Return Me._name
		End Get
		Set
			If (String.Equals(Me._name, value) = false) Then
				Me._name = value
			End If
		End Set
	End Property
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_country", DbType:="VarChar(MAX)")>  _
	Public Property country() As String
		Get
			Return Me._country
		End Get
		Set
			If (String.Equals(Me._country, value) = false) Then
				Me._country = value
			End If
		End Set
	End Property
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_pop2010", DbType:="Float")>  _
	Public Property pop2010() As System.Nullable(Of Double)
		Get
			Return Me._pop2010
		End Get
		Set
			If (Me._pop2010.Equals(value) = false) Then
				Me._pop2010 = value
			End If
		End Set
	End Property
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_pop2015", DbType:="Float")>  _
	Public Property pop2015() As System.Nullable(Of Double)
		Get
			Return Me._pop2015
		End Get
		Set
			If (Me._pop2015.Equals(value) = false) Then
				Me._pop2015 = value
			End If
		End Set
	End Property
End Class

<Global.System.Data.Linq.Mapping.TableAttribute(Name:="dbo.Countries")>  _
Partial Public Class Country
	
	Private _name As String
	
	Private _pop2010 As System.Nullable(Of Double)
	
	Private _monetaryUnit As String
	
	Public Sub New()
		MyBase.New
	End Sub
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_name", DbType:="VarChar(MAX) NOT NULL", CanBeNull:=false)>  _
	Public Property name() As String
		Get
			Return Me._name
		End Get
		Set
			If (String.Equals(Me._name, value) = false) Then
				Me._name = value
			End If
		End Set
	End Property
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_pop2010", DbType:="Float")>  _
	Public Property pop2010() As System.Nullable(Of Double)
		Get
			Return Me._pop2010
		End Get
		Set
			If (Me._pop2010.Equals(value) = false) Then
				Me._pop2010 = value
			End If
		End Set
	End Property
	
	<Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_monetaryUnit", DbType:="VarChar(MAX)")>  _
	Public Property monetaryUnit() As String
		Get
			Return Me._monetaryUnit
		End Get
		Set
			If (String.Equals(Me._monetaryUnit, value) = false) Then
				Me._monetaryUnit = value
			End If
		End Set
	End Property
End Class
