private List <RepresentationAttribute> GetRepresentationAttributes(Representation representation) { if (representation.Attributes == null) { return(new List <RepresentationAttribute>()); } return(GetRepresentationAttributes(representation.ResourceType, representation.Attributes)); }
public Task <bool> AddRepresentation(Common.Models.Representation representation) { var record = new Representation { Id = representation.Id, Created = representation.Created, LastModified = representation.LastModified, ResourceType = representation.ResourceType, Version = representation.Version, Attributes = GetRepresentationAttributes(representation) }; _representations.Add(record); return(Task.FromResult(true)); }