Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created July 2, 2018 19:52
Show Gist options
  • Save csharpforevermore/fec411ccd7dc141659924202c55ce413 to your computer and use it in GitHub Desktop.
Save csharpforevermore/fec411ccd7dc141659924202c55ce413 to your computer and use it in GitHub Desktop.
Get a Media item by GUID / ID from a controller
IMedia content = UmbracoContext.Current.Application.Services.MediaService.GetById(Guid.Parse("bc6de686-25fa-49fa-a46b-a2a19c70bd8b"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment