Ejemplo n.º 1
0
 public override bool Equals(object obj)
 {
     return((null != obj) && (obj is Author) && PrimaryKey.Equals((obj as Author).PrimaryKey));
 }
 public bool Equals(ParseDataDto other)
 {
     return(PrimaryKey.Equals(other.PrimaryKey) &&
            Values.Equals(other.Values));
 }
Ejemplo n.º 3
0
 public override bool Equals(object obj)
 {
     return((null != obj) && (obj is BookRental) && PrimaryKey.Equals((obj as BookRental).PrimaryKey));
 }
Ejemplo n.º 4
0
 public override bool Equals(object obj)
 {
     return((null != obj) && (obj is Category) && PrimaryKey.Equals((obj as Category).PrimaryKey));
 }
 public bool Equals(JsonObjectDto other)
 {
     return(PrimaryKey.Equals(other.PrimaryKey) &&
            Values.Equals(other.Values));
 }
Ejemplo n.º 6
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || GetType() != o.GetType())
            {
                return(false);
            }
            if (!base.Equals(o))
            {
                return(false);
            }

            var that = (MetaTable)o;

            if (PrimaryKey == null && that.PrimaryKey != null)
            {
                return(false);
            }
            if (PrimaryKey != null && that.PrimaryKey == null)
            {
                return(false);
            }
            if (PrimaryKey != null && that.PrimaryKey != null &&
                !PrimaryKey.Equals(that.PrimaryKey))
            {
                return(false);
            }

            foreach (MetaForeignKey foreignKey in ForeignKeys)
            {
                bool found = false;
                foreach (MetaForeignKey thatForeignKey in that.ForeignKeys)
                {
                    if (foreignKey.Name.Equals(thatForeignKey.Name))
                    {
                        found = true;
                        if (!foreignKey.Equals(thatForeignKey))
                        {
                            return(false);
                        }
                    }
                }
                if (!found)
                {
                    return(false);
                }
            }

            foreach (MetaForeignKey thatForeignKey in that.ForeignKeys)
            {
                bool found = false;
                foreach (MetaForeignKey foreignKey in ForeignKeys)
                {
                    if (foreignKey.Name.Equals(thatForeignKey.Name))
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    return(false);
                }
            }

            foreach (MetaColumn column in Columns)
            {
                bool found = false;
                foreach (MetaColumn thatColumn in that.Columns)
                {
                    if (column.Name.Equals(thatColumn.Name))
                    {
                        found = true;
                        if (!column.Equals(thatColumn))
                        {
                            return(false);
                        }
                    }
                }
                if (!found)
                {
                    return(false);
                }
            }

            foreach (MetaColumn thatColumn in that.Columns)
            {
                bool found = false;
                foreach (MetaColumn column in Columns)
                {
                    if (column.Name.Equals(thatColumn.Name))
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    return(false);
                }
            }

            return(true);
        }