Given the following class:
public class Post
{
public Post()
{
Tags = new List<Tag>();
}
public int Id { get; set; }
// ...more properties...
public virtual ICollection<Tag> Tags { get; set; }
}
and my ps1 entry code:
$model = Get-ProjectType $EntityName -Project $Project
Add-ProjectItemViaTemplate $controllerName -Template ControllerTemplate `
-Model @{ Namespace = $namespace; T = [MarshalByRefObject]$model; } `
-SuccessMessage "Added ControllerTemplate output at {0}" `
-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force
where $model is the Post class.
how would i gain access to "Tag" object properties?
I have "Tags" ICollection as a EnvDTE.CodeTypeRef.
I noticed that most of the mvcscaffolding is using Get-RelatedEntities to unwrap the generics - is this the only way to access the Tag properties?