/src/MBlog.Core/Domain/DataAccess/MBlogRepository.designer.cs
C# | 241 lines | 202 code | 30 blank | 9 comment | 14 complexity | 5a0a45b2d6df8e36d9a2f0953dc83e7f MD5 | raw file
- #pragma warning disable 1591
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:2.0.50727.3053
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- namespace MBlog.Core.Domain.DataAccess.Context
- {
- 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;
-
-
- [System.Data.Linq.Mapping.DatabaseAttribute(Name="MBlog")]
- public partial class MBlogRepositoryDataContext : System.Data.Linq.DataContext
- {
-
- private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
-
- #region Extensibility Method Definitions
- partial void OnCreated();
- partial void InsertPost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
- partial void UpdatePost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
- partial void DeletePost(MBlog.Core.Domain.DataAccess.Entity.Post instance);
- #endregion
-
- public MBlogRepositoryDataContext() :
- base(global::MBlog.Core.Properties.Settings.Default.MBlogConnectionString, mappingSource)
- {
- OnCreated();
- }
-
- public MBlogRepositoryDataContext(string connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public MBlogRepositoryDataContext(System.Data.IDbConnection connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public MBlogRepositoryDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public MBlogRepositoryDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public System.Data.Linq.Table<MBlog.Core.Domain.DataAccess.Entity.Post> Posts
- {
- get
- {
- return this.GetTable<MBlog.Core.Domain.DataAccess.Entity.Post>();
- }
- }
- }
- }
- namespace MBlog.Core.Domain.DataAccess.Entity
- {
- using System.Data.Linq;
- using System.Data.Linq.Mapping;
- using System.ComponentModel;
- using System;
-
-
- [Table(Name="dbo.Posts")]
- public partial class Post : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _PostID;
-
- private string _Title;
-
- private string _Content;
-
- private string _Author;
-
- private System.DateTime _Timestamp;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnPostIDChanging(int value);
- partial void OnPostIDChanged();
- partial void OnTitleChanging(string value);
- partial void OnTitleChanged();
- partial void OnContentChanging(string value);
- partial void OnContentChanged();
- partial void OnAuthorChanging(string value);
- partial void OnAuthorChanged();
- partial void OnTimestampChanging(System.DateTime value);
- partial void OnTimestampChanged();
- #endregion
-
- public Post()
- {
- OnCreated();
- }
-
- [Column(Storage="_PostID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int PostID
- {
- get
- {
- return this._PostID;
- }
- set
- {
- if ((this._PostID != value))
- {
- this.OnPostIDChanging(value);
- this.SendPropertyChanging();
- this._PostID = value;
- this.SendPropertyChanged("PostID");
- this.OnPostIDChanged();
- }
- }
- }
-
- [Column(Storage="_Title", DbType="VarChar(300) NOT NULL", CanBeNull=false)]
- public string Title
- {
- get
- {
- return this._Title;
- }
- set
- {
- if ((this._Title != value))
- {
- this.OnTitleChanging(value);
- this.SendPropertyChanging();
- this._Title = value;
- this.SendPropertyChanged("Title");
- this.OnTitleChanged();
- }
- }
- }
-
- [Column(Storage="_Content", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
- public string Content
- {
- get
- {
- return this._Content;
- }
- set
- {
- if ((this._Content != value))
- {
- this.OnContentChanging(value);
- this.SendPropertyChanging();
- this._Content = value;
- this.SendPropertyChanged("Content");
- this.OnContentChanged();
- }
- }
- }
-
- [Column(Storage="_Author", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
- public string Author
- {
- get
- {
- return this._Author;
- }
- set
- {
- if ((this._Author != value))
- {
- this.OnAuthorChanging(value);
- this.SendPropertyChanging();
- this._Author = value;
- this.SendPropertyChanged("Author");
- this.OnAuthorChanged();
- }
- }
- }
-
- [Column(Storage="_Timestamp", DbType="SmallDateTime NOT NULL")]
- public System.DateTime Timestamp
- {
- get
- {
- return this._Timestamp;
- }
- set
- {
- if ((this._Timestamp != value))
- {
- this.OnTimestampChanging(value);
- this.SendPropertyChanging();
- this._Timestamp = value;
- this.SendPropertyChanged("Timestamp");
- this.OnTimestampChanged();
- }
- }
- }
-
- 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));
- }
- }
- }
- }
- #pragma warning restore 1591