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

            return
                ((
                     ManufacturerId == other.ManufacturerId ||
                     ManufacturerId != null &&
                     ManufacturerId.Equals(other.ManufacturerId)
                     ) &&
                 (
                     CategoryId == other.CategoryId ||
                     CategoryId != null &&
                     CategoryId.Equals(other.CategoryId)
                 ) &&
                 (
                     ProductName == other.ProductName ||
                     ProductName != null &&
                     other.ProductName != null &&
                     ProductName.SequenceEqual(other.ProductName)
                 ));
        }
        /// <summary>
        /// Returns true if CategoryInfoWithProductCountDto instances are equal
        /// </summary>
        /// <param name="other">Instance of CategoryInfoWithProductCountDto to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CategoryInfoWithProductCountDto other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CategoryId == other.CategoryId ||

                     CategoryId.Equals(other.CategoryId)
                     ) &&
                 (
                     ParentCategoryId == other.ParentCategoryId ||
                     ParentCategoryId != null &&
                     ParentCategoryId.Equals(other.ParentCategoryId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     ProductCount == other.ProductCount ||

                     ProductCount.Equals(other.ProductCount)
                 ));
        }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CatalogItem other &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) &&
                   ((Abbreviation == null && other.Abbreviation == null) || (Abbreviation?.Equals(other.Abbreviation) == true)) &&
                   ((LabelColor == null && other.LabelColor == null) || (LabelColor?.Equals(other.LabelColor) == true)) &&
                   ((AvailableOnline == null && other.AvailableOnline == null) || (AvailableOnline?.Equals(other.AvailableOnline) == true)) &&
                   ((AvailableForPickup == null && other.AvailableForPickup == null) || (AvailableForPickup?.Equals(other.AvailableForPickup) == true)) &&
                   ((AvailableElectronically == null && other.AvailableElectronically == null) || (AvailableElectronically?.Equals(other.AvailableElectronically) == true)) &&
                   ((CategoryId == null && other.CategoryId == null) || (CategoryId?.Equals(other.CategoryId) == true)) &&
                   ((TaxIds == null && other.TaxIds == null) || (TaxIds?.Equals(other.TaxIds) == true)) &&
                   ((ModifierListInfo == null && other.ModifierListInfo == null) || (ModifierListInfo?.Equals(other.ModifierListInfo) == true)) &&
                   ((Variations == null && other.Variations == null) || (Variations?.Equals(other.Variations) == true)) &&
                   ((ProductType == null && other.ProductType == null) || (ProductType?.Equals(other.ProductType) == true)) &&
                   ((SkipModifierScreen == null && other.SkipModifierScreen == null) || (SkipModifierScreen?.Equals(other.SkipModifierScreen) == true)) &&
                   ((ItemOptions == null && other.ItemOptions == null) || (ItemOptions?.Equals(other.ItemOptions) == true)));
        }
Ejemplo n.º 4
0
 public bool Equals(Product other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) &&
            string.Equals(Name, other.Name) &&
            string.Equals(BarCode, other.BarCode) &&
            Price == other.Price &&
            string.Equals(Description, other.Description) &&
            IsPublished == other.IsPublished &&
            Equals(Dimensions, other.Dimensions) &&
            ManufacturerId.Equals(other.ManufacturerId) &&
            Equals(Pictures, other.Pictures) &&
            CategoryId.Equals(other.CategoryId) &&
            Equals(Category, other.Category) &&
            ProductTypeId == other.ProductTypeId &&
            Equals(ProductType, other.ProductType) &&
            string.Equals(ExternalSourceName, other.ExternalSourceName) &&
            string.Equals(ExternalId, other.ExternalId));
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLLibraryQuestionCategory)obj;

            //reference types
            if (!Object.Equals(Name, other.Name))
            {
                return(false);
            }
            //value types
            if (!CategoryId.Equals(other.CategoryId))
            {
                return(false);
            }
            if (!AttributeFlags.Equals(other.AttributeFlags))
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 6
0
 public override bool Equals(Object obj)
 {
     if (obj is Source ob)
     {
         return(Id.Equals(ob.Id) && Name.Equals(ob.Name) && CategoryId.Equals(ob.CategoryId));
     }
     return(false);
 }
Ejemplo n.º 7
0
 public override bool Equals(object obj)
 {
     return(obj is ProductDataModel model &&
            Sku == model.Sku &&
            Name == model.Name &&
            Description == model.Description &&
            Price == model.Price &&
            Discount == model.Discount &&
            CategoryId.Equals(model.CategoryId));
 }
Ejemplo n.º 8
0
 public override bool Equals(object obj)
 {
     return(obj is AuctionDTO dTO &&
            Name == dTO.Name &&
            ActualPrice == dTO.ActualPrice &&
            IsOpened == dTO.IsOpened &&
            ClosingTime == dTO.ClosingTime &&
            Description == dTO.Description &&
            CategoryId.Equals(dTO.CategoryId) &&
            AccountId.Equals(dTO.AccountId));
 }
Ejemplo n.º 9
0
 public override bool Equals(Object obj)
 {
     if (obj is Problem ob)
     {
         return(Id.Equals(ob.Id) && CategoryId.Equals(ob.CategoryId) && ThemeId.Equals(ob.ThemeId) && Adress.Equals(ob.Adress) &&
                SourceId.Equals(ob.SourceId) && CreateDate.Equals(ob.CreateDate) && AnswerDate.Equals(ob.AnswerDate) &&
                ProblemText.Equals(ob.ProblemText) && ProblemPhotos.Equals(ob.ProblemPhotos) && AnswerText.Equals(ob.AnswerText) &&
                AnswerPhotos.Equals(ob.AnswerPhotos) && StatusId.Equals(ob.StatusId) && DistrictId.Equals(ob.DistrictId) && ChildID.Equals(ob.ChildID) &&
                ParentID.Equals(ob.ParentID) && IspolnitelName.Equals(ob.IspolnitelName) && IspolnitelId.Equals(ob.IspolnitelId));
     }
     return(false);
 }
Ejemplo n.º 10
0
        public bool Equals(CategoryExecutor other)
        {
            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(CategoryId.Equals(other.CategoryId));
        }
Ejemplo n.º 11
0
 public bool Equals(Category other)
 {
     //Check whether the compared object is null.
     if (Object.ReferenceEquals(other, null))
     {
         return(false);
     }
     //Check whether the compared object references the same data.
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     //Check whether the products' properties are equal.
     return(CategoryId.Equals(other.CategoryId) && Name.Equals(other.Name));
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Returns true if Category instances are equal
        /// </summary>
        /// <param name="other">Instance of Category to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Category other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CategoryId == other.CategoryId ||
                     CategoryId != null &&
                     CategoryId.Equals(other.CategoryId)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Info == other.Info ||
                     Info != null &&
                     Info.Equals(other.Info)
                 ) &&
                 (
                     CategoryItems == other.CategoryItems ||
                     CategoryItems != null &&
                     CategoryItems.SequenceEqual(other.CategoryItems)
                 ) &&
                 (
                     Buy == other.Buy ||
                     Buy != null &&
                     Buy.Equals(other.Buy)
                 ) &&
                 (
                     Sell == other.Sell ||
                     Sell != null &&
                     Sell.Equals(other.Sell)
                 ));
        }
Ejemplo n.º 13
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            CategoryEN t = obj as CategoryEN;

            if (t == null)
            {
                return(false);
            }
            if (CategoryId.Equals(t.CategoryId))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 14
0
        public override bool Equals(object other)
        {
            CategoryModel Category = (CategoryModel)other;

            // Check whether the compared object is null.

            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }

            // Check whether the compared object references the same data.

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            // Check whether the objects’ properties are equal.

            return(CategoryId.Equals(Category.CategoryId));
        }
Ejemplo n.º 15
0
        public void Save()
        {
            if (Repository == null)
            {
                throw new ArgumentNullException("Incident domain repository not referenced.");
            }

            if (String.IsNullOrEmpty(Title))
            {
                throw new Exception("Incident title should not be empty.");
            }

            if (Title.Length > 20)
            {
                throw new Exception("The title of the incident should be longer than 20 characters.");
            }

            if (String.IsNullOrEmpty(Description))
            {
                throw new Exception("Incident description should not be empty.");
            }

            if (Description.Length > 500)
            {
                throw new Exception("The description of the incident should be longer than 500 characters.");
            }

            if (CategoryId.Equals(null))
            {
                throw new Exception("Category invalid.");
            }

            if (StatusId.Equals(null))
            {
                throw new Exception("Status invalid.");
            }

            Repository.Add(this);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Returns true if CategoryDto instances are equal
        /// </summary>
        /// <param name="other">Instance of CategoryDto to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CategoryDto other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CategoryId == other.CategoryId ||

                     CategoryId.Equals(other.CategoryId)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ));
        }
Ejemplo n.º 17
0
 public virtual bool Equals(ContentUnit <TGenId, TCategoryId, TPaneId, TSourceId, TPublishedBy> other)
 => other.IsNotNull() && CategoryId.Equals(other.CategoryId) && Title == other.Title;
Ejemplo n.º 18
0
 // 除主键外的唯一索引相等比较(参见实体映射的唯一索引配置)。
 public bool Equals(Article <TGenId, TCategoryId, TCreatedBy> other)
 => other.IsNotNull() && CategoryId.Equals(other.CategoryId) && Title == other.Title;
Ejemplo n.º 19
0
 /// <summary>
 /// Relational equality checking if related guid exists in relation.
 /// This works because Guids are unique regardless of entity type.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     return(PostId.Equals(obj) ||
            CategoryId.Equals(obj));
 }
Ejemplo n.º 20
0
 public override bool Equals(Object obj)
 {
     if (obj is Theme ob)
     {
         return(Id.Equals(ob.Id) && Name.Equals(ob.Name) && Activity.Equals(ob.Activity) && CategoryId.Equals(ob.CategoryId));
     }
     return(false);
 }
Ejemplo n.º 21
0
 public virtual bool Equals(ContentClaim <TIncremId, TCategoryId, TCreatedBy> other)
 => other.IsNotNull() && CategoryId.Equals(other.CategoryId) && Name == other.Name;
Ejemplo n.º 22
0
 public override bool Equals(object obj)
 {
     return(CategoryId.Equals(((Category)obj).CategoryId));
 }