Esempio n. 1
0
        public Tuple <VoteRecord, UserRecord> Reverse(Vote destination)
        {
            VoteRecord voteRec = new VoteRecord()
            {
                Id           = destination.Id,
                UserId       = destination.User.Id,
                ResourceId   = destination.ResourceId,
                ResourceType = destination.ResourceType,
                Direction    = destination.Direction
            };

            UserRecord userRecord = userRecordMapper.Reverse(destination.User);

            return(Tuple.Create <VoteRecord, UserRecord>(voteRec, userRecord));
        }
Esempio n. 2
0
 private VoteReadView Map(VoteRecord source) => new VoteReadView()
 {
     Direction = source.Direction
 };
Esempio n. 3
0
 private Vote Map(VoteRecord rec) => factory.Create(rec.Id, rec.UserId, rec.ResourceType, rec.ResourceId, rec.Direction);