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