using System; using Widgetsphere.EFCore.DataAccess; namespace Acme.EFExample.EFDAL.Entity { #region CountryPrimaryKey /// <summary> /// A strongly-typed primary key object for the 'Country' table. /// </summary> [Serializable()] public partial class CountryPrimaryKey : Widgetsphere.EFCore.DataAccess.IPrimaryKey { /// <summary> /// A primary key field of the Country entity /// </summary> protected int _CountryId; /// <summary> /// The constructor for this object which takes the fields that comprise the primary key for the 'Country' table. /// </summary> public CountryPrimaryKey(int countryId) { _CountryId = countryId; } /// <summary> /// A primary key for the 'Country' table. /// </summary> public int CountryId { get { return _CountryId; } } /// <summary> /// Returns a value indicating whether the current object is equal to a specified object. /// </summary> public override bool Equals(object obj) { if (obj == null) return false; if (obj.GetType() == this.GetType()) { bool retval = true; retval &= (this.CountryId == ((Acme.EFExample.EFDAL.Entity.CountryPrimaryKey)obj).CountryId); return retval; } return false; } /// <summary> /// Serves as a hash function for this particular type. /// </summary> public override int GetHashCode() { return base.GetHashCode(); } } #endregion }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)