public async Task <Item> Get(string type, string value) { var contentType = ContentTypeProvider.Get(type); var content = await ContainerSpecificContentGetter.GetAsync <IContent>(value, null, contentType.Container).ConfigureAwait(false); if (content == null) { return(null); } return(new Item((content as INameable)?.Name ?? content.Id, null, content.Id, (content as IImageable)?.Image)); }
public async Task <User> FindByIdAsync(string userId, CancellationToken cancellationToken) { return(await ContainerSpecificContentGetter.GetAsync <User>(userId, null, Container)); }