public static Models.Representation SetData(this Models.Representation representation, Representation repr) { if (repr == null) { throw new ArgumentNullException(nameof(repr)); } representation.Created = repr.Created; representation.LastModified = repr.LastModified; representation.ResourceType = repr.ResourceType; representation.Version = repr.Version; return(representation); }
public static Representation ToDomain(this Models.Representation representation) { if (representation == null) { throw new ArgumentNullException(nameof(representation)); } return(new Representation { Id = representation.Id, Created = representation.Created, LastModified = representation.Created, ResourceType = representation.ResourceType, Version = representation.Version }); }