📄 datamapping.designer.cs
字号:
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_Activities(Activity entity)
{
this.SendPropertyChanging();
entity.Game = this;
}
private void detach_Activities(Activity entity)
{
this.SendPropertyChanging();
entity.Game = null;
}
private void attach_PlayerInGames(Player entity)
{
this.SendPropertyChanging();
entity.Game = this;
}
private void detach_PlayerInGames(Player entity)
{
this.SendPropertyChanging();
entity.Game = null;
}
}
[Table(Name="dbo.User")]
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _UserID;
private string _Name;
private int _IsOnline;
private int _WinNum;
private int _PlayNum;
private string _IP;
private string _Password;
private EntitySet<Player> _PlayerInGames;
private EntitySet<Vote> _Votes;
private EntitySet<Vote> _Votes1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnUserIDChanging(string value);
partial void OnUserIDChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
partial void OnIsOnlineChanging(int value);
partial void OnIsOnlineChanged();
partial void OnWinNumChanging(int value);
partial void OnWinNumChanged();
partial void OnPlayNumChanging(int value);
partial void OnPlayNumChanged();
partial void OnIPChanging(string value);
partial void OnIPChanged();
partial void OnPasswordChanging(string value);
partial void OnPasswordChanged();
#endregion
public User()
{
this._PlayerInGames = new EntitySet<Player>(new Action<Player>(this.attach_PlayerInGames), new Action<Player>(this.detach_PlayerInGames));
this._Votes = new EntitySet<Vote>(new Action<Vote>(this.attach_Votes), new Action<Vote>(this.detach_Votes));
this._Votes1 = new EntitySet<Vote>(new Action<Vote>(this.attach_Votes1), new Action<Vote>(this.detach_Votes1));
OnCreated();
}
[Column(Storage="_UserID", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string UserID
{
get
{
return this._UserID;
}
set
{
if ((this._UserID != value))
{
this.OnUserIDChanging(value);
this.SendPropertyChanging();
this._UserID = value;
this.SendPropertyChanged("UserID");
this.OnUserIDChanged();
}
}
}
[Column(Storage="_Name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
[Column(Storage="_IsOnline", DbType="Int NOT NULL")]
public int IsOnline
{
get
{
return this._IsOnline;
}
set
{
if ((this._IsOnline != value))
{
this.OnIsOnlineChanging(value);
this.SendPropertyChanging();
this._IsOnline = value;
this.SendPropertyChanged("IsOnline");
this.OnIsOnlineChanged();
}
}
}
[Column(Storage="_WinNum", DbType="Int NOT NULL")]
public int WinNum
{
get
{
return this._WinNum;
}
set
{
if ((this._WinNum != value))
{
this.OnWinNumChanging(value);
this.SendPropertyChanging();
this._WinNum = value;
this.SendPropertyChanged("WinNum");
this.OnWinNumChanged();
}
}
}
[Column(Storage="_PlayNum", DbType="Int NOT NULL")]
public int PlayNum
{
get
{
return this._PlayNum;
}
set
{
if ((this._PlayNum != value))
{
this.OnPlayNumChanging(value);
this.SendPropertyChanging();
this._PlayNum = value;
this.SendPropertyChanged("PlayNum");
this.OnPlayNumChanged();
}
}
}
[Column(Storage="_IP", DbType="NVarChar(200)")]
public string IP
{
get
{
return this._IP;
}
set
{
if ((this._IP != value))
{
this.OnIPChanging(value);
this.SendPropertyChanging();
this._IP = value;
this.SendPropertyChanged("IP");
this.OnIPChanged();
}
}
}
[Column(Storage="_Password", CanBeNull=false)]
public string Password
{
get
{
return this._Password;
}
set
{
if ((this._Password != value))
{
this.OnPasswordChanging(value);
this.SendPropertyChanging();
this._Password = value;
this.SendPropertyChanged("Password");
this.OnPasswordChanged();
}
}
}
[Association(Name="User_Player", Storage="_PlayerInGames", OtherKey="UserID")]
public EntitySet<Player> Players
{
get
{
return this._PlayerInGames;
}
set
{
this._PlayerInGames.Assign(value);
}
}
[Association(Name="User_Vote", Storage="_Votes", OtherKey="Voter")]
public EntitySet<Vote> Votes
{
get
{
return this._Votes;
}
set
{
this._Votes.Assign(value);
}
}
[Association(Name="User_Vote1", Storage="_Votes1", OtherKey="Candidate")]
public EntitySet<Vote> Votes1
{
get
{
return this._Votes1;
}
set
{
this._Votes1.Assign(value);
}
}
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));
}
}
private void attach_PlayerInGames(Player entity)
{
this.SendPropertyChanging();
entity.User = this;
}
private void detach_PlayerInGames(Player entity)
{
this.SendPropertyChanging();
entity.User = null;
}
private void attach_Votes(Vote entity)
{
this.SendPropertyChanging();
entity.User = this;
}
private void detach_Votes(Vote entity)
{
this.SendPropertyChanging();
entity.User = null;
}
private void attach_Votes1(Vote entity)
{
this.SendPropertyChanging();
entity.User1 = this;
}
private void detach_Votes1(Vote entity)
{
this.SendPropertyChanging();
entity.User1 = null;
}
}
[Table(Name="dbo.Player")]
public partial class Player : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _UserID;
private int _GameNo;
private int _IsActive;
private int _RoleID;
private int _DeadActivityNo;
private EntityRef<Game> _Game;
private EntityRef<User> _Player;
private EntityRef<Role> _Role;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnUserIDChanging(string value);
partial void OnUserIDChanged();
partial void OnGameNoChanging(int value);
partial void OnGameNoChanged();
partial void OnIsActiveChanging(int value);
partial void OnIsActiveChanged();
partial void OnRoleIDChanging(int value);
partial void OnRoleIDChanged();
partial void OnDeadActivityNoChanging(int value);
partial void OnDeadActivityNoChanged();
#endregion
public Player()
{
this._Game = default(EntityRef<Game>);
this._Player = default(EntityRef<User>);
this._Role = default(EntityRef<Role>);
OnCreated();
}
[Column(Storage="_UserID", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string UserID
{
get
{
return this._UserID;
}
set
{
if ((this._UserID != value))
{
if (this._Player.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnUserIDChanging(value);
this.SendPropertyChanging();
this._UserID = value;
this.SendPropertyChanged("UserID");
this.OnUserIDChanged();
}
}
}
[Column(Storage="_GameNo", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int GameNo
{
get
{
return this._GameNo;
}
set
{
if ((this._GameNo != value))
{
if (this._Game.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnGameNoChanging(value);
this.SendPropertyChanging();
this._GameNo = value;
this.SendPropertyChanged("GameNo");
this.OnGameNoChanged();
}
}
}
[Column(Storage="_IsActive", DbType="Int NOT NULL")]
public int IsActive
{
get
{
return this._IsActive;
}
set
{
if ((this._IsActive != value))
{
this.OnIsActiveChanging(value);
this.SendPropertyChanging();
this._IsActive = value;
this.SendPropertyChanged("IsActive");
this.OnIsActiveChanged();
}
}
}
[Column(Storage="_RoleID", DbType="Int NOT NULL")]
public int RoleID
{
get
{
return this._RoleID;
}
set
{
if ((this._RoleID != value))
{
if (this._Role.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRoleIDChanging(value);
this.SendPropertyChanging();
this._RoleID = value;
this.SendPropertyChanged("RoleID");
this.OnRoleIDChanged();
}
}
}
[Column(Storage="_DeadActivityNo", DbType="Int NOT NULL")]
public int DeadActivityNo
{
get
{
return this._DeadActivityNo;
}
set
{
if ((this._DeadActivityNo != value))
{
this.OnDeadActivityNoChanging(value);
this.SendPropertyChanging();
this._DeadActivityNo = value;
this.SendPropertyChanged("DeadActivityNo");
this.OnDeadActivityNoChanged();
}
}
}
[Association(Name="Game_Player", Storage="_Game", ThisKey="GameNo", IsForeignKey=true)]
public Game Game
{
get
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -