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) }); }
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), }); }