Ejemplo n.º 1
0
 public virtual async Task <ResourceCollection <TResource> > ConvertToResourceCollectionAsync(IEnumerable <TModel> models, ExpandQuery expand)
 {
     return(new ResourceCollection <TResource>(await ConvertToResourcesAsync(models, expand))
     {
         Href = UrlProvider.GetRequestUri()
     });
 }
Ejemplo n.º 2
0
 public abstract Task <TResource> ConvertToResourceAsync(TModel model, ExpandQuery expand);
Ejemplo n.º 3
0
        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);
        }