/// <summary> /// Creates a model result with an ID and name property from a basic result object. /// </summary> /// <param name="source">The source.</param> /// <returns>Named item model</returns> public NamedItemModel Create(IBasicObject source) { return(new NamedItemModel { Id = source.Id, Name = source.Name }); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false. /// </returns> public bool Equals(IBasicObject other) { return(other.Id == Id); }