procsharp.designer.cs
来自「C#高级编程第6版随书源代码 值得下载」· CS 代码 · 共 190 行
CS
190 行
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1378
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Wrox.ProCSharp.SqlServer
{
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Data;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
using System.ComponentModel;
using System;
[System.Data.Linq.Mapping.DatabaseAttribute(Name="ProCSharp")]
public partial class ProCSharpDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertExam(Exam instance);
partial void UpdateExam(Exam instance);
partial void DeleteExam(Exam instance);
#endregion
static ProCSharpDataContext()
{
}
public ProCSharpDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ProCSharpDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ProCSharpDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public ProCSharpDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public ProCSharpDataContext() :
base(global::LinqClient.Properties.Settings.Default.ProCSharpConnectionString, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table<Exam> Exams
{
get
{
return this.GetTable<Exam>();
}
}
}
[Table(Name="dbo.Exams")]
public partial class Exam : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _Id;
private string _Number;
private System.Xml.Linq.XDocument _Info;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate();
partial void OnCreated();
partial void OnIdChanging(int value);
partial void OnIdChanged();
partial void OnNumberChanging(string value);
partial void OnNumberChanged();
partial void OnInfoChanging(System.Xml.Linq.XDocument value);
partial void OnInfoChanged();
#endregion
public Exam()
{
OnCreated();
}
[Column(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int Id
{
get
{
return this._Id;
}
set
{
if ((this._Id != value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id = value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[Column(Storage="_Number", DbType="NChar(10) NOT NULL", CanBeNull=false)]
public string Number
{
get
{
return this._Number;
}
set
{
if ((this._Number != value))
{
this.OnNumberChanging(value);
this.SendPropertyChanging();
this._Number = value;
this.SendPropertyChanged("Number");
this.OnNumberChanged();
}
}
}
[Column(Storage="_Info", DbType="Xml NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
public System.Xml.Linq.XDocument Info
{
get
{
return this._Info;
}
set
{
if ((this._Info != value))
{
this.OnInfoChanging(value);
this.SendPropertyChanging();
this._Info = value;
this.SendPropertyChanged("Info");
this.OnInfoChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?