//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.235
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Original file name:
// Generation date: 7/29/2011 10:16:50 AM
namespace SilverlightSqlSpatial.Map.SilverlightSqlSpatial.Services
{
    
    /// <summary>
    /// There are no comments for DataManager in the schema.
    /// </summary>
    public partial class DataManager : global::System.Data.Services.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new DataManager object.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public DataManager(global::System.Uri serviceRoot) : 
                base(serviceRoot)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.ResolveType = new global::System.Func<string, global::System.Type>(this.ResolveTypeFromName);
            this.OnContextCreated();
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected global::System.Type ResolveTypeFromName(string typeName)
        {
            if (typeName.StartsWith("SilverlightSqlSpatial.Model", global::System.StringComparison.Ordinal))
            {
                return this.GetType().Assembly.GetType(string.Concat("SilverlightSqlSpatial.Map.SilverlightSqlSpatial.Services", typeName.Substring(27)), false);
            }
            return null;
        }
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            if (clientType.Namespace.Equals("SilverlightSqlSpatial.Map.SilverlightSqlSpatial.Services", global::System.StringComparison.Ordinal))
            {
                return string.Concat("SilverlightSqlSpatial.Model.", clientType.Name);
            }
            return null;
        }
        /// <summary>
        /// There are no comments for Counties in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<County> Counties
        {
            get
            {
                if ((this._Counties == null))
                {
                    this._Counties = base.CreateQuery<County>("Counties");
                }
                return this._Counties;
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<County> _Counties;
        /// <summary>
        /// There are no comments for Locations in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Data.Services.Client.DataServiceQuery<Location> Locations
        {
            get
            {
                if ((this._Locations == null))
                {
                    this._Locations = base.CreateQuery<Location>("Locations");
                }
                return this._Locations;
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Data.Services.Client.DataServiceQuery<Location> _Locations;
        /// <summary>
        /// There are no comments for Counties in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToCounties(County county)
        {
            base.AddObject("Counties", county);
        }
        /// <summary>
        /// There are no comments for Locations in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public void AddToLocations(Location location)
        {
            base.AddObject("Locations", location);
        }
    }
    /// <summary>
    /// There are no comments for SilverlightSqlSpatial.Model.County in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Counties")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")]
    public partial class County : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new County object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static County CreateCounty(int ID)
        {
            County county = new County();
            county.Id = ID;
            return county;
        }
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
                this.OnPropertyChanged("Id");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Name in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this.OnNameChanging(value);
                this._Name = value;
                this.OnNameChanged();
                this.OnPropertyChanged("Name");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Name;
        partial void OnNameChanging(string value);
        partial void OnNameChanged();
        /// <summary>
        /// There are no comments for Property StateName in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string StateName
        {
            get
            {
                return this._StateName;
            }
            set
            {
                this.OnStateNameChanging(value);
                this._StateName = value;
                this.OnStateNameChanged();
                this.OnPropertyChanged("StateName");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _StateName;
        partial void OnStateNameChanging(string value);
        partial void OnStateNameChanged();
        /// <summary>
        /// There are no comments for Property StateFips in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string StateFips
        {
            get
            {
                return this._StateFips;
            }
            set
            {
                this.OnStateFipsChanging(value);
                this._StateFips = value;
                this.OnStateFipsChanged();
                this.OnPropertyChanged("StateFips");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _StateFips;
        partial void OnStateFipsChanging(string value);
        partial void OnStateFipsChanged();
        /// <summary>
        /// There are no comments for Property CountyFips in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string CountyFips
        {
            get
            {
                return this._CountyFips;
            }
            set
            {
                this.OnCountyFipsChanging(value);
                this._CountyFips = value;
                this.OnCountyFipsChanged();
                this.OnPropertyChanged("CountyFips");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _CountyFips;
        partial void OnCountyFipsChanging(string value);
        partial void OnCountyFipsChanged();
        /// <summary>
        /// There are no comments for Property Fips in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Fips
        {
            get
            {
                return this._Fips;
            }
            set
            {
                this.OnFipsChanging(value);
                this._Fips = value;
                this.OnFipsChanged();
                this.OnPropertyChanged("Fips");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Fips;
        partial void OnFipsChanging(string value);
        partial void OnFipsChanged();
        /// <summary>
        /// There are no comments for Property GeographyWKT in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string GeographyWKT
        {
            get
            {
                return this._GeographyWKT;
            }
            set
            {
                this.OnGeographyWKTChanging(value);
                this._GeographyWKT = value;
                this.OnGeographyWKTChanged();
                this.OnPropertyChanged("GeographyWKT");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _GeographyWKT;
        partial void OnGeographyWKTChanging(string value);
        partial void OnGeographyWKTChanged();
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
    /// <summary>
    /// There are no comments for SilverlightSqlSpatial.Model.Location in the schema.
    /// </summary>
    /// <KeyProperties>
    /// ID
    /// </KeyProperties>
    [global::System.Data.Services.Common.EntitySetAttribute("Locations")]
    [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")]
    public partial class Location : global::System.ComponentModel.INotifyPropertyChanged
    {
        /// <summary>
        /// Create a new Location object.
        /// </summary>
        /// <param name="ID">Initial value of ID.</param>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public static Location CreateLocation(int ID)
        {
            Location location = new Location();
            location.ID = ID;
            return location;
        }
        /// <summary>
        /// There are no comments for Property ID in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public int ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                this.OnIDChanging(value);
                this._ID = value;
                this.OnIDChanged();
                this.OnPropertyChanged("ID");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private int _ID;
        partial void OnIDChanging(int value);
        partial void OnIDChanged();
        /// <summary>
        /// There are no comments for Property City in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string City
        {
            get
            {
                return this._City;
            }
            set
            {
                this.OnCityChanging(value);
                this._City = value;
                this.OnCityChanged();
                this.OnPropertyChanged("City");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _City;
        partial void OnCityChanging(string value);
        partial void OnCityChanged();
        /// <summary>
        /// There are no comments for Property Country in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string Country
        {
            get
            {
                return this._Country;
            }
            set
            {
                this.OnCountryChanging(value);
                this._Country = value;
                this.OnCountryChanged();
                this.OnPropertyChanged("Country");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _Country;
        partial void OnCountryChanging(string value);
        partial void OnCountryChanged();
        /// <summary>
        /// There are no comments for Property Latitude in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Nullable<float> Latitude
        {
            get
            {
                return this._Latitude;
            }
            set
            {
                this.OnLatitudeChanging(value);
                this._Latitude = value;
                this.OnLatitudeChanged();
                this.OnPropertyChanged("Latitude");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Nullable<float> _Latitude;
        partial void OnLatitudeChanging(global::System.Nullable<float> value);
        partial void OnLatitudeChanged();
        /// <summary>
        /// There are no comments for Property Longitude in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public global::System.Nullable<float> Longitude
        {
            get
            {
                return this._Longitude;
            }
            set
            {
                this.OnLongitudeChanging(value);
                this._Longitude = value;
                this.OnLongitudeChanged();
                this.OnPropertyChanged("Longitude");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private global::System.Nullable<float> _Longitude;
        partial void OnLongitudeChanging(global::System.Nullable<float> value);
        partial void OnLongitudeChanged();
        /// <summary>
        /// There are no comments for Property GeoPointWKT in the schema.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public string GeoPointWKT
        {
            get
            {
                return this._GeoPointWKT;
            }
            set
            {
                this.OnGeoPointWKTChanging(value);
                this._GeoPointWKT = value;
                this.OnGeoPointWKTChanged();
                this.OnPropertyChanged("GeoPointWKT");
            }
        }
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        private string _GeoPointWKT;
        partial void OnGeoPointWKTChanging(string value);
        partial void OnGeoPointWKTChanged();
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
        protected virtual void OnPropertyChanged(string property)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property));
            }
        }
    }
}
