コード例 #1
0
 private Entity CreateEntity(IResponseViewModel model)
 {
     return(new Entity
     {
         Actions = _actionsGenerator.Get(model),
         Class = _classGenerator.Get(model),
         Links = _linksGenerator.Get(model),
         Properties = _propertiesGenerator.Get(model),
         Entities = _subEntitiesGenerator.Get(model),
         Title = _titleGenerator.Get(model)
     });
 }
コード例 #2
0
 private IEnumerable <SubEntity> GetParentSubEntity(IResponseViewModel model, IEnumerable <string> rel)
 {
     return(new SubEntity[]
     {
         new EmbeddedRepresentation
         {
             Class = _classGenerator.Get(model),
             Links = _linksGenerator.Get(model),
             Properties = _propertiesGenerator.Get(model),
             Rel = rel,
             Title = _titleGenerator.Get(model)
         }
     });
 }