Skip to content

Instantly share code, notes, and snippets.

@ArveSystad
Created September 28, 2014 12:18
Show Gist options
  • Save ArveSystad/153108d101acf724d7d6 to your computer and use it in GitHub Desktop.
Save ArveSystad/153108d101acf724d7d6 to your computer and use it in GitHub Desktop.
[CatalogContentType(GUID = "64ED6E28-07B1-4F18-A075-046D1557EFFE")]
public class Product : ProductContent, IResourceable
{
public virtual string ContentAssetIdInternal { get; set; }
public Guid ContentAssetsID
{
get
{
Guid assetId;
if (Guid.TryParse(ContentAssetIdInternal, out assetId))
return assetId;
return Guid.Empty;
}
set
{
ContentAssetIdInternal = value.ToString();
this.ThrowIfReadOnly();
IsModified = true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment