コード例 #1
0
ファイル: VoteRecordMapper.cs プロジェクト: wishgale/Updog.in
        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));
        }
コード例 #2
0
 private VoteReadView Map(VoteRecord source) => new VoteReadView()
 {
     Direction = source.Direction
 };
コード例 #3
0
ファイル: VoteRepo.cs プロジェクト: maoyuan121/Updog.in
 private Vote Map(VoteRecord rec) => factory.Create(rec.Id, rec.UserId, rec.ResourceType, rec.ResourceId, rec.Direction);