//------------------------------------------------------------------------------ // // 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.ComponentModel; using System.Data.EntityClient; using System.Data.Objects; using System.Data.Objects.DataClasses; using System.Linq; using System.Runtime.Serialization; using System.Xml.Serialization; [assembly: EdmSchemaAttribute()] namespace GravityWorks.DerbyApp.WP7.Service { #region Contexts /// /// No Metadata Documentation available. /// public partial class DerbyNamesEntities : ObjectContext { #region Constructors /// /// Initializes a new DerbyNamesEntities object using the connection string found in the 'DerbyNamesEntities' section of the application configuration file. /// public DerbyNamesEntities() : base("name=DerbyNamesEntities", "DerbyNamesEntities") { this.ContextOptions.LazyLoadingEnabled = true; OnContextCreated(); } /// /// Initialize a new DerbyNamesEntities object. /// public DerbyNamesEntities(string connectionString) : base(connectionString, "DerbyNamesEntities") { this.ContextOptions.LazyLoadingEnabled = true; OnContextCreated(); } /// /// Initialize a new DerbyNamesEntities object. /// public DerbyNamesEntities(EntityConnection connection) : base(connection, "DerbyNamesEntities") { this.ContextOptions.LazyLoadingEnabled = true; OnContextCreated(); } #endregion #region Partial Methods partial void OnContextCreated(); #endregion #region ObjectSet Properties /// /// No Metadata Documentation available. /// public ObjectSet DerbyNames { get { if ((_DerbyNames == null)) { _DerbyNames = base.CreateObjectSet("DerbyNames"); } return _DerbyNames; } } private ObjectSet _DerbyNames; /// /// No Metadata Documentation available. /// public ObjectSet Leagues { get { if ((_Leagues == null)) { _Leagues = base.CreateObjectSet("Leagues"); } return _Leagues; } } private ObjectSet _Leagues; #endregion #region AddTo Methods /// /// Deprecated Method for adding a new object to the DerbyNames EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// public void AddToDerbyNames(DerbyName derbyName) { base.AddObject("DerbyNames", derbyName); } /// /// Deprecated Method for adding a new object to the Leagues EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// public void AddToLeagues(League league) { base.AddObject("Leagues", league); } #endregion } #endregion #region Entities /// /// No Metadata Documentation available. /// [EdmEntityTypeAttribute(NamespaceName="DerbyNamesModel", Name="DerbyName")] [Serializable()] [DataContractAttribute(IsReference=true)] public partial class DerbyName : EntityObject { #region Factory Method /// /// Create a new DerbyName object. /// /// Initial value of the DerbyNameId property. public static DerbyName CreateDerbyName(global::System.Int32 derbyNameId) { DerbyName derbyName = new DerbyName(); derbyName.DerbyNameId = derbyNameId; return derbyName; } #endregion #region Primitive Properties /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] [DataMemberAttribute()] public global::System.Int32 DerbyNameId { get { return _DerbyNameId; } set { if (_DerbyNameId != value) { OnDerbyNameIdChanging(value); ReportPropertyChanging("DerbyNameId"); _DerbyNameId = StructuralObject.SetValidValue(value); ReportPropertyChanged("DerbyNameId"); OnDerbyNameIdChanged(); } } } private global::System.Int32 _DerbyNameId; partial void OnDerbyNameIdChanging(global::System.Int32 value); partial void OnDerbyNameIdChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String Name { get { return _Name; } set { OnNameChanging(value); ReportPropertyChanging("Name"); _Name = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("Name"); OnNameChanged(); } } private global::System.String _Name; partial void OnNameChanging(global::System.String value); partial void OnNameChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String Number { get { return _Number; } set { OnNumberChanging(value); ReportPropertyChanging("Number"); _Number = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("Number"); OnNumberChanged(); } } private global::System.String _Number; partial void OnNumberChanging(global::System.String value); partial void OnNumberChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public Nullable DateAdded { get { return _DateAdded; } set { OnDateAddedChanging(value); ReportPropertyChanging("DateAdded"); _DateAdded = StructuralObject.SetValidValue(value); ReportPropertyChanged("DateAdded"); OnDateAddedChanged(); } } private Nullable _DateAdded; partial void OnDateAddedChanging(Nullable value); partial void OnDateAddedChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String League { get { return _League; } set { OnLeagueChanging(value); ReportPropertyChanging("League"); _League = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("League"); OnLeagueChanged(); } } private global::System.String _League; partial void OnLeagueChanging(global::System.String value); partial void OnLeagueChanged(); #endregion } /// /// No Metadata Documentation available. /// [EdmEntityTypeAttribute(NamespaceName="DerbyNamesModel", Name="League")] [Serializable()] [DataContractAttribute(IsReference=true)] public partial class League : EntityObject { #region Factory Method /// /// Create a new League object. /// /// Initial value of the LeagueId property. /// Initial value of the LeagueName property. public static League CreateLeague(global::System.Int32 leagueId, global::System.String leagueName) { League league = new League(); league.LeagueId = leagueId; league.LeagueName = leagueName; return league; } #endregion #region Primitive Properties /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] [DataMemberAttribute()] public global::System.Int32 LeagueId { get { return _LeagueId; } set { if (_LeagueId != value) { OnLeagueIdChanging(value); ReportPropertyChanging("LeagueId"); _LeagueId = StructuralObject.SetValidValue(value); ReportPropertyChanged("LeagueId"); OnLeagueIdChanged(); } } } private global::System.Int32 _LeagueId; partial void OnLeagueIdChanging(global::System.Int32 value); partial void OnLeagueIdChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] [DataMemberAttribute()] public global::System.String LeagueName { get { return _LeagueName; } set { OnLeagueNameChanging(value); ReportPropertyChanging("LeagueName"); _LeagueName = StructuralObject.SetValidValue(value, false); ReportPropertyChanged("LeagueName"); OnLeagueNameChanged(); } } private global::System.String _LeagueName; partial void OnLeagueNameChanging(global::System.String value); partial void OnLeagueNameChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String URL { get { return _URL; } set { OnURLChanging(value); ReportPropertyChanging("URL"); _URL = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("URL"); OnURLChanged(); } } private global::System.String _URL; partial void OnURLChanging(global::System.String value); partial void OnURLChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String StateProvince { get { return _StateProvince; } set { OnStateProvinceChanging(value); ReportPropertyChanging("StateProvince"); _StateProvince = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("StateProvince"); OnStateProvinceChanged(); } } private global::System.String _StateProvince; partial void OnStateProvinceChanging(global::System.String value); partial void OnStateProvinceChanged(); /// /// No Metadata Documentation available. /// [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)] [DataMemberAttribute()] public global::System.String CountryCode { get { return _CountryCode; } set { OnCountryCodeChanging(value); ReportPropertyChanging("CountryCode"); _CountryCode = StructuralObject.SetValidValue(value, true); ReportPropertyChanged("CountryCode"); OnCountryCodeChanged(); } } private global::System.String _CountryCode; partial void OnCountryCodeChanging(global::System.String value); partial void OnCountryCodeChanged(); #endregion } #endregion }