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)); }
private VoteReadView Map(VoteRecord source) => new VoteReadView() { Direction = source.Direction };
private Vote Map(VoteRecord rec) => factory.Create(rec.Id, rec.UserId, rec.ResourceType, rec.ResourceId, rec.Direction);