using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; namespace Umbraco.Web.Models.ContentEditing { /// /// Represents a content property to be saved /// [DataContract(Name = "property", Namespace = "")] public class ContentPropertyBasic { [DataMember(Name = "id", IsRequired = true)] [Required] public int Id { get; set; } [DataMember(Name = "value")] public string Value { get; set; } protected bool Equals(ContentPropertyBasic other) { return Id == other.Id; } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var other = obj as ContentPropertyBasic; return other != null && Equals(other); } public override int GetHashCode() { return Id; } } }