'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.1433
'
' 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
<System.Data.Linq.Mapping.DatabaseAttribute(Name:="Test")> _
Partial Public Class DataClasses1DataContext
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
Partial Private Sub InsertCourse(ByVal instance As Course)
End Sub
Partial Private Sub UpdateCourse(ByVal instance As Course)
End Sub
Partial Private Sub DeleteCourse(ByVal instance As Course)
End Sub
#End Region
Public Sub New()
MyBase.New(Global.System.Configuration.ConfigurationManager.ConnectionStrings("TestConnectionString").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 Courses() As System.Data.Linq.Table(Of Course)
Get
Return Me.GetTable(Of Course)()
End Get
End Property
End Class
<Table(Name:="dbo.Course")> _
Partial Public Class Course
Implements System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
Private Shared emptyChangingEventArgs As PropertyChangingEventArgs = New PropertyChangingEventArgs(String.Empty)
Private _CourseID As Integer
Private _CourseName As String
#Region "Extensibility Method Definitions"
Partial Private Sub OnLoaded()
End Sub
Partial Private Sub OnValidate(ByVal action As System.Data.Linq.ChangeAction)
End Sub
Partial Private Sub OnCreated()
End Sub
Partial Private Sub OnCourseIDChanging(ByVal value As Integer)
End Sub
Partial Private Sub OnCourseIDChanged()
End Sub
Partial Private Sub OnCourseNameChanging(ByVal value As String)
End Sub
Partial Private Sub OnCourseNameChanged()
End Sub
#End Region
Public Sub New()
MyBase.New()
OnCreated()
End Sub
<Column(Storage:="_CourseID", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=True, IsDbGenerated:=True)> _
Public Property CourseID() As Integer
Get
Return Me._CourseID
End Get
Set(ByVal value As Integer)
If ((Me._CourseID = value) _
= False) Then
Me.OnCourseIDChanging(value)
Me.SendPropertyChanging()
Me._CourseID = value
Me.SendPropertyChanged("CourseID")
Me.OnCourseIDChanged()
End If
End Set
End Property
<Column(Storage:="_CourseName", DbType:="VarChar(50)")> _
Public Property CourseName() As String
Get
Return Me._CourseName
End Get
Set(ByVal value As String)
If (String.Equals(Me._CourseName, value) = False) Then
Me.OnCourseNameChanging(value)
Me.SendPropertyChanging()
Me._CourseName = value
Me.SendPropertyChanged("CourseName")
Me.OnCourseNameChanged()
End If
End Set
End Property
Public Event PropertyChanging As PropertyChangingEventHandler Implements System.ComponentModel.INotifyPropertyChanging.PropertyChanging
Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Overridable Sub SendPropertyChanging()
If ((Me.PropertyChangingEvent Is Nothing) _
= False) Then
RaiseEvent PropertyChanging(Me, emptyChangingEventArgs)
End If
End Sub
Protected Overridable Sub SendPropertyChanged(ByVal propertyName As [String])
If ((Me.PropertyChangedEvent Is Nothing) _
= False) Then
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class