Ejemplo n.º 1
0
 public static AnswerMetaViewModel From(AnswerMetaInternalModel model)
 {
     return(new AnswerMetaViewModel()
     {
         AnswerId = model.Meta.AnswerId.ToString(),
         AnswerMetaId = model.Meta.AnswerMetaId.ToString(),
         Votes = model.Meta.Votes,
         Global = new AnswerGlobalMetaViewModel()
         {
             Votes = model.GlobalMeta.Votes
         },
         RowVersion = PangulRowVersion.GetString(model.Meta.RowVersion)
     });
 }
Ejemplo n.º 2
0
 private object MapToAnswerMetaResult(AnswerMetaInternalModel model)
 {
     return(new
     {
         AnswerId = model.Meta.AnswerId.ToString(),
         AnswerMetaId = model.Meta.AnswerMetaId.ToString(),
         Votes = model.Meta.Votes,
         Global = new
         {
             Votes = model.GlobalMeta.Votes
         },
         RowVersion = PangulRowVersion.GetString(model.Meta.RowVersion),
     });
 }