/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (FeatureName != null)
         {
             hashCode = hashCode * 59 + FeatureName.GetHashCode();
         }
         if (FeatureDescription != null)
         {
             hashCode = hashCode * 59 + FeatureDescription.GetHashCode();
         }
         if (ActivePercentage != null)
         {
             hashCode = hashCode * 59 + ActivePercentage.GetHashCode();
         }
         if (CookieName != null)
         {
             hashCode = hashCode * 59 + CookieName.GetHashCode();
         }
         if (CookieMaxAge != null)
         {
             hashCode = hashCode * 59 + CookieMaxAge.GetHashCode();
         }
         return(hashCode);
     }
 }
        public ActionResult DeleteConfirmed(int id)
        {
            ActivePercentage activePercentage = db.ActivePercentages.Find(id);

            db.ActivePercentages.Remove(activePercentage);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Percentage")] ActivePercentage activePercentage)
 {
     if (ModelState.IsValid)
     {
         db.Entry(activePercentage).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(activePercentage));
 }
        public ActionResult Create([Bind(Include = "Id,Percentage")] ActivePercentage activePercentage)
        {
            if (ModelState.IsValid)
            {
                db.ActivePercentages.Add(activePercentage);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(activePercentage));
        }
        // GET: ActivePercentages/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ActivePercentage activePercentage = db.ActivePercentages.Find(id);

            if (activePercentage == null)
            {
                return(HttpNotFound());
            }
            return(View(activePercentage));
        }
        /// <summary>
        /// Returns true if ComAdobeGraniteFragsImplRandomFeatureProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteFragsImplRandomFeatureProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteFragsImplRandomFeatureProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FeatureName == other.FeatureName ||
                     FeatureName != null &&
                     FeatureName.Equals(other.FeatureName)
                     ) &&
                 (
                     FeatureDescription == other.FeatureDescription ||
                     FeatureDescription != null &&
                     FeatureDescription.Equals(other.FeatureDescription)
                 ) &&
                 (
                     ActivePercentage == other.ActivePercentage ||
                     ActivePercentage != null &&
                     ActivePercentage.Equals(other.ActivePercentage)
                 ) &&
                 (
                     CookieName == other.CookieName ||
                     CookieName != null &&
                     CookieName.Equals(other.CookieName)
                 ) &&
                 (
                     CookieMaxAge == other.CookieMaxAge ||
                     CookieMaxAge != null &&
                     CookieMaxAge.Equals(other.CookieMaxAge)
                 ));
        }