PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/src/Core/Model/DataAccess/DB.designer.cs

https://github.com/minhajuddin/openidauth
C# | 187 lines | 153 code | 25 blank | 9 comment | 10 complexity | c04b951d39a8bcdd93c93dbf571cafd8 MD5 | raw file
  1#pragma warning disable 1591
  2//------------------------------------------------------------------------------
  3// <auto-generated>
  4//     This code was generated by a tool.
  5//     Runtime Version:2.0.50727.3053
  6//
  7//     Changes to this file may cause incorrect behavior and will be lost if
  8//     the code is regenerated.
  9// </auto-generated>
 10//------------------------------------------------------------------------------
 11
 12namespace OpenIdAuth.Core.Model.DataAccess.Context
 13{
 14	using System.Data.Linq;
 15	using System.Data.Linq.Mapping;
 16	using System.Data;
 17	using System.Collections.Generic;
 18	using System.Reflection;
 19	using System.Linq;
 20	using System.Linq.Expressions;
 21	
 22	
 23	[System.Data.Linq.Mapping.DatabaseAttribute(Name="OpenIdAuth")]
 24	public partial class DB : System.Data.Linq.DataContext
 25	{
 26		
 27		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
 28		
 29    #region Extensibility Method Definitions
 30    partial void OnCreated();
 31    partial void InsertUser(OpenIdAuth.Core.Model.DataAccess.Entity.User instance);
 32    partial void UpdateUser(OpenIdAuth.Core.Model.DataAccess.Entity.User instance);
 33    partial void DeleteUser(OpenIdAuth.Core.Model.DataAccess.Entity.User instance);
 34    #endregion
 35		
 36		public DB(string connection) : 
 37				base(connection, mappingSource)
 38		{
 39			OnCreated();
 40		}
 41		
 42		public DB(System.Data.IDbConnection connection) : 
 43				base(connection, mappingSource)
 44		{
 45			OnCreated();
 46		}
 47		
 48		public DB(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
 49				base(connection, mappingSource)
 50		{
 51			OnCreated();
 52		}
 53		
 54		public DB(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
 55				base(connection, mappingSource)
 56		{
 57			OnCreated();
 58		}
 59		
 60		public System.Data.Linq.Table<OpenIdAuth.Core.Model.DataAccess.Entity.User> Users
 61		{
 62			get
 63			{
 64				return this.GetTable<OpenIdAuth.Core.Model.DataAccess.Entity.User>();
 65			}
 66		}
 67	}
 68}
 69namespace OpenIdAuth.Core.Model.DataAccess.Entity
 70{
 71	using System.Data.Linq;
 72	using System.Data.Linq.Mapping;
 73	using System.ComponentModel;
 74	using System;
 75	
 76	
 77	[Table(Name="dbo.Users")]
 78	public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
 79	{
 80		
 81		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
 82		
 83		private int _UserId;
 84		
 85		private string _UserName;
 86		
 87		private string _Password;
 88		
 89    #region Extensibility Method Definitions
 90    partial void OnLoaded();
 91    partial void OnValidate(System.Data.Linq.ChangeAction action);
 92    partial void OnCreated();
 93    partial void OnUserIdChanging(int value);
 94    partial void OnUserIdChanged();
 95    partial void OnUserNameChanging(string value);
 96    partial void OnUserNameChanged();
 97    partial void OnPasswordChanging(string value);
 98    partial void OnPasswordChanged();
 99    #endregion
100		
101		public User()
102		{
103			OnCreated();
104		}
105		
106		[Column(Storage="_UserId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
107		public int UserId
108		{
109			get
110			{
111				return this._UserId;
112			}
113			set
114			{
115				if ((this._UserId != value))
116				{
117					this.OnUserIdChanging(value);
118					this.SendPropertyChanging();
119					this._UserId = value;
120					this.SendPropertyChanged("UserId");
121					this.OnUserIdChanged();
122				}
123			}
124		}
125		
126		[Column(Storage="_UserName", DbType="VarChar(200) NOT NULL", CanBeNull=false)]
127		public string UserName
128		{
129			get
130			{
131				return this._UserName;
132			}
133			set
134			{
135				if ((this._UserName != value))
136				{
137					this.OnUserNameChanging(value);
138					this.SendPropertyChanging();
139					this._UserName = value;
140					this.SendPropertyChanged("UserName");
141					this.OnUserNameChanged();
142				}
143			}
144		}
145		
146		[Column(Storage="_Password", DbType="VarChar(200) NOT NULL", CanBeNull=false)]
147		public string Password
148		{
149			get
150			{
151				return this._Password;
152			}
153			set
154			{
155				if ((this._Password != value))
156				{
157					this.OnPasswordChanging(value);
158					this.SendPropertyChanging();
159					this._Password = value;
160					this.SendPropertyChanged("Password");
161					this.OnPasswordChanged();
162				}
163			}
164		}
165		
166		public event PropertyChangingEventHandler PropertyChanging;
167		
168		public event PropertyChangedEventHandler PropertyChanged;
169		
170		protected virtual void SendPropertyChanging()
171		{
172			if ((this.PropertyChanging != null))
173			{
174				this.PropertyChanging(this, emptyChangingEventArgs);
175			}
176		}
177		
178		protected virtual void SendPropertyChanged(String propertyName)
179		{
180			if ((this.PropertyChanged != null))
181			{
182				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
183			}
184		}
185	}
186}
187#pragma warning restore 1591