using System;

namespace Valg.EVA.Skanning.ServicesModel.ElectionConfig.Model
{
    public class County
    {
        public string Code { get; set; }
        public string Name { get; set; }

        public override int GetHashCode()
        {
            return Code.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            var county = obj as County;
            if (county != null)
            {
                return string.Compare(county.Code, Code, StringComparison.Ordinal) == 0;
            }
            else
            {
                return false;
            }
        }
    }
}

