public override void AcceptModelProperties(AttachmentModelBase other) { base.AcceptModelProperties(other); var otherAlbum = (TAlbum)other; AlbumCollectionDescriptors.Clear(); ChildAttachmentDescriptors.Clear(); AlbumCollectionDescriptors.AddRange(otherAlbum.AlbumCollectionDescriptors); ChildAttachmentDescriptors.AddRange(otherAlbum.ChildAttachmentDescriptors); }
public virtual void AcceptModelProperties(AttachmentModelBase other) { if (TypeOfAttachment != other.TypeOfAttachment) { throw new InvalidOperationException("Нельзя принимать свойства от модели другого типа"); } Id = other.Id; Title = other.Title; Description = other.Description; CreationTime = other.CreationTime; ModificationTime = other.ModificationTime; RootSubjectId = other.RootSubjectId; RootSubjectType = other.RootSubjectType; HostType = other.HostType; HostId = other.HostId; }