public static CollectionWithIdentifier FromModel(Uri appBase, ResourceModel itemModel, HydraUriModel uriModel) { var collection = new CollectionWithIdentifier { Identifier = new Uri(appBase, new Uri(uriModel.EntryPointUri, UriKind.RelativeOrAbsolute)), Search = uriModel.SearchTemplate, }; collection.Manages = new CollectionManages { Object = uriModel.Uri.ResourceModel.Hydra().Collection.ManagesRdfTypeName }; return(collection); }
public Collection(Type itemType, HydraUriModel id) { Manages = itemType; Identifier = id; Search = id.SearchTemplate; }