public virtual async Task <ResourceCollection <TResource> > ConvertToResourceCollectionAsync(IEnumerable <TModel> models, ExpandQuery expand) { return(new ResourceCollection <TResource>(await ConvertToResourcesAsync(models, expand)) { Href = UrlProvider.GetRequestUri() }); }
public abstract Task <TResource> ConvertToResourceAsync(TModel model, ExpandQuery expand);
public virtual async Task <IEnumerable <TResource> > ConvertToResourcesAsync(IEnumerable <TModel> models, ExpandQuery expand) { List <TResource> resources = new List <TResource>(); foreach (var model in models) { resources.Add(await ConvertToResourceAsync(model, expand)); } return(resources); }