PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/src/MBlog.Core/Domain/DataAccess/MBlogRepository.designer.cs

https://github.com/minhajuddin/mblog
C# | 241 lines | 202 code | 30 blank | 9 comment | 14 complexity | 5a0a45b2d6df8e36d9a2f0953dc83e7f 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 MBlog.Core.Domain.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="MBlog")]
 24	public partial class MBlogRepositoryDataContext : 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 InsertPost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
 32    partial void UpdatePost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
 33    partial void DeletePost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
 34    #endregion
 35		
 36		public MBlogRepositoryDataContext() : 
 37				base(global::MBlog.Core.Properties.Settings.Default.MBlogConnectionString, mappingSource)
 38		{
 39			OnCreated();
 40		}
 41		
 42		public MBlogRepositoryDataContext(string connection) : 
 43				base(connection, mappingSource)
 44		{
 45			OnCreated();
 46		}
 47		
 48		public MBlogRepositoryDataContext(System.Data.IDbConnection connection) : 
 49				base(connection, mappingSource)
 50		{
 51			OnCreated();
 52		}
 53		
 54		public MBlogRepositoryDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
 55				base(connection, mappingSource)
 56		{
 57			OnCreated();
 58		}
 59		
 60		public MBlogRepositoryDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
 61				base(connection, mappingSource)
 62		{
 63			OnCreated();
 64		}
 65		
 66		public System.Data.Linq.Table<MBlog.Core.Domain.DataAccess.Entity.Post> Posts
 67		{
 68			get
 69			{
 70				return this.GetTable<MBlog.Core.Domain.DataAccess.Entity.Post>();
 71			}
 72		}
 73	}
 74}
 75namespace MBlog.Core.Domain.DataAccess.Entity
 76{
 77	using System.Data.Linq;
 78	using System.Data.Linq.Mapping;
 79	using System.ComponentModel;
 80	using System;
 81	
 82	
 83	[Table(Name="dbo.Posts")]
 84	public partial class Post : INotifyPropertyChanging, INotifyPropertyChanged
 85	{
 86		
 87		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
 88		
 89		private int _PostID;
 90		
 91		private string _Title;
 92		
 93		private string _Content;
 94		
 95		private string _Author;
 96		
 97		private System.DateTime _Timestamp;
 98		
 99    #region Extensibility Method Definitions
100    partial void OnLoaded();
101    partial void OnValidate(System.Data.Linq.ChangeAction action);
102    partial void OnCreated();
103    partial void OnPostIDChanging(int value);
104    partial void OnPostIDChanged();
105    partial void OnTitleChanging(string value);
106    partial void OnTitleChanged();
107    partial void OnContentChanging(string value);
108    partial void OnContentChanged();
109    partial void OnAuthorChanging(string value);
110    partial void OnAuthorChanged();
111    partial void OnTimestampChanging(System.DateTime value);
112    partial void OnTimestampChanged();
113    #endregion
114		
115		public Post()
116		{
117			OnCreated();
118		}
119		
120		[Column(Storage="_PostID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
121		public int PostID
122		{
123			get
124			{
125				return this._PostID;
126			}
127			set
128			{
129				if ((this._PostID != value))
130				{
131					this.OnPostIDChanging(value);
132					this.SendPropertyChanging();
133					this._PostID = value;
134					this.SendPropertyChanged("PostID");
135					this.OnPostIDChanged();
136				}
137			}
138		}
139		
140		[Column(Storage="_Title", DbType="VarChar(300) NOT NULL", CanBeNull=false)]
141		public string Title
142		{
143			get
144			{
145				return this._Title;
146			}
147			set
148			{
149				if ((this._Title != value))
150				{
151					this.OnTitleChanging(value);
152					this.SendPropertyChanging();
153					this._Title = value;
154					this.SendPropertyChanged("Title");
155					this.OnTitleChanged();
156				}
157			}
158		}
159		
160		[Column(Storage="_Content", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
161		public string Content
162		{
163			get
164			{
165				return this._Content;
166			}
167			set
168			{
169				if ((this._Content != value))
170				{
171					this.OnContentChanging(value);
172					this.SendPropertyChanging();
173					this._Content = value;
174					this.SendPropertyChanged("Content");
175					this.OnContentChanged();
176				}
177			}
178		}
179		
180		[Column(Storage="_Author", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
181		public string Author
182		{
183			get
184			{
185				return this._Author;
186			}
187			set
188			{
189				if ((this._Author != value))
190				{
191					this.OnAuthorChanging(value);
192					this.SendPropertyChanging();
193					this._Author = value;
194					this.SendPropertyChanged("Author");
195					this.OnAuthorChanged();
196				}
197			}
198		}
199		
200		[Column(Storage="_Timestamp", DbType="SmallDateTime NOT NULL")]
201		public System.DateTime Timestamp
202		{
203			get
204			{
205				return this._Timestamp;
206			}
207			set
208			{
209				if ((this._Timestamp != value))
210				{
211					this.OnTimestampChanging(value);
212					this.SendPropertyChanging();
213					this._Timestamp = value;
214					this.SendPropertyChanged("Timestamp");
215					this.OnTimestampChanged();
216				}
217			}
218		}
219		
220		public event PropertyChangingEventHandler PropertyChanging;
221		
222		public event PropertyChangedEventHandler PropertyChanged;
223		
224		protected virtual void SendPropertyChanging()
225		{
226			if ((this.PropertyChanging != null))
227			{
228				this.PropertyChanging(this, emptyChangingEventArgs);
229			}
230		}
231		
232		protected virtual void SendPropertyChanged(String propertyName)
233		{
234			if ((this.PropertyChanged != null))
235			{
236				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
237			}
238		}
239	}
240}
241#pragma warning restore 1591