//------------------------------------------------------------------------------
//
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;
[assembly: EdmSchemaAttribute()]
namespace SqlMapper.EntityFramework
{
#region Contexts
///
/// No Metadata Documentation available.
///
public partial class tempdbEntities1 : ObjectContext
{
#region Constructors
///
/// Initializes a new tempdbEntities1 object using the connection string found in the 'tempdbEntities1' section of the application configuration file.
///
public tempdbEntities1() : base("name=tempdbEntities1", "tempdbEntities1")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
///
/// Initialize a new tempdbEntities1 object.
///
public tempdbEntities1(string connectionString) : base(connectionString, "tempdbEntities1")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
///
/// Initialize a new tempdbEntities1 object.
///
public tempdbEntities1(EntityConnection connection) : base(connection, "tempdbEntities1")
{
this.ContextOptions.LazyLoadingEnabled = true;
OnContextCreated();
}
#endregion
#region Partial Methods
partial void OnContextCreated();
#endregion
#region ObjectSet Properties
///
/// No Metadata Documentation available.
///
public ObjectSet Posts
{
get
{
if ((_Posts == null))
{
_Posts = base.CreateObjectSet("Posts");
}
return _Posts;
}
}
private ObjectSet _Posts;
#endregion
#region AddTo Methods
///
/// Deprecated Method for adding a new object to the Posts EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead.
///
public void AddToPosts(Post post)
{
base.AddObject("Posts", post);
}
#endregion
}
#endregion
#region Entities
///
/// No Metadata Documentation available.
///
[EdmEntityTypeAttribute(NamespaceName="tempdbModel", Name="Post")]
[Serializable()]
[DataContractAttribute(IsReference=true)]
public partial class Post : EntityObject
{
#region Factory Method
///
/// Create a new Post object.
///
/// Initial value of the Id property.
/// Initial value of the Text property.
/// Initial value of the CreationDate property.
/// Initial value of the LastChangeDate property.
public static Post CreatePost(global::System.Int32 id, global::System.String text, global::System.DateTime creationDate, global::System.DateTime lastChangeDate)
{
Post post = new Post();
post.Id = id;
post.Text = text;
post.CreationDate = creationDate;
post.LastChangeDate = lastChangeDate;
return post;
}
#endregion
#region Primitive Properties
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
[DataMemberAttribute()]
public global::System.Int32 Id
{
get
{
return _Id;
}
set
{
if (_Id != value)
{
OnIdChanging(value);
ReportPropertyChanging("Id");
_Id = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Id");
OnIdChanged();
}
}
}
private global::System.Int32 _Id;
partial void OnIdChanging(global::System.Int32 value);
partial void OnIdChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.String Text
{
get
{
return _Text;
}
set
{
OnTextChanging(value);
ReportPropertyChanging("Text");
_Text = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Text");
OnTextChanged();
}
}
private global::System.String _Text;
partial void OnTextChanging(global::System.String value);
partial void OnTextChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime CreationDate
{
get
{
return _CreationDate;
}
set
{
OnCreationDateChanging(value);
ReportPropertyChanging("CreationDate");
_CreationDate = StructuralObject.SetValidValue(value);
ReportPropertyChanged("CreationDate");
OnCreationDateChanged();
}
}
private global::System.DateTime _CreationDate;
partial void OnCreationDateChanging(global::System.DateTime value);
partial void OnCreationDateChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
public global::System.DateTime LastChangeDate
{
get
{
return _LastChangeDate;
}
set
{
OnLastChangeDateChanging(value);
ReportPropertyChanging("LastChangeDate");
_LastChangeDate = StructuralObject.SetValidValue(value);
ReportPropertyChanged("LastChangeDate");
OnLastChangeDateChanged();
}
}
private global::System.DateTime _LastChangeDate;
partial void OnLastChangeDateChanging(global::System.DateTime value);
partial void OnLastChangeDateChanged();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter1
{
get
{
return _Counter1;
}
set
{
OnCounter1Changing(value);
ReportPropertyChanging("Counter1");
_Counter1 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter1");
OnCounter1Changed();
}
}
private Nullable _Counter1;
partial void OnCounter1Changing(Nullable value);
partial void OnCounter1Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter2
{
get
{
return _Counter2;
}
set
{
OnCounter2Changing(value);
ReportPropertyChanging("Counter2");
_Counter2 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter2");
OnCounter2Changed();
}
}
private Nullable _Counter2;
partial void OnCounter2Changing(Nullable value);
partial void OnCounter2Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter3
{
get
{
return _Counter3;
}
set
{
OnCounter3Changing(value);
ReportPropertyChanging("Counter3");
_Counter3 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter3");
OnCounter3Changed();
}
}
private Nullable _Counter3;
partial void OnCounter3Changing(Nullable value);
partial void OnCounter3Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter4
{
get
{
return _Counter4;
}
set
{
OnCounter4Changing(value);
ReportPropertyChanging("Counter4");
_Counter4 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter4");
OnCounter4Changed();
}
}
private Nullable _Counter4;
partial void OnCounter4Changing(Nullable value);
partial void OnCounter4Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter5
{
get
{
return _Counter5;
}
set
{
OnCounter5Changing(value);
ReportPropertyChanging("Counter5");
_Counter5 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter5");
OnCounter5Changed();
}
}
private Nullable _Counter5;
partial void OnCounter5Changing(Nullable value);
partial void OnCounter5Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter6
{
get
{
return _Counter6;
}
set
{
OnCounter6Changing(value);
ReportPropertyChanging("Counter6");
_Counter6 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter6");
OnCounter6Changed();
}
}
private Nullable _Counter6;
partial void OnCounter6Changing(Nullable value);
partial void OnCounter6Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter7
{
get
{
return _Counter7;
}
set
{
OnCounter7Changing(value);
ReportPropertyChanging("Counter7");
_Counter7 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter7");
OnCounter7Changed();
}
}
private Nullable _Counter7;
partial void OnCounter7Changing(Nullable value);
partial void OnCounter7Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter8
{
get
{
return _Counter8;
}
set
{
OnCounter8Changing(value);
ReportPropertyChanging("Counter8");
_Counter8 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter8");
OnCounter8Changed();
}
}
private Nullable _Counter8;
partial void OnCounter8Changing(Nullable value);
partial void OnCounter8Changed();
///
/// No Metadata Documentation available.
///
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
public Nullable Counter9
{
get
{
return _Counter9;
}
set
{
OnCounter9Changing(value);
ReportPropertyChanging("Counter9");
_Counter9 = StructuralObject.SetValidValue(value);
ReportPropertyChanged("Counter9");
OnCounter9Changed();
}
}
private Nullable _Counter9;
partial void OnCounter9Changing(Nullable value);
partial void OnCounter9Changed();
#endregion
}
#endregion
}