Пример #1
0
        public static CandidateNoteEntity Map(this ContenderNote note)
        {
            var entity = new CandidateNoteEntity
            {
                id           = note.Id,
                createdTime  = note.CreatedTime,
                candidateId  = note.ContenderId,
                searcherId   = note.OwnerId,
                sharedWithId = note.SharedWithId,
            };

            note.MapTo(entity);
            return(entity);
        }
Пример #2
0
        public static T MapTo <T>(this CandidateNoteEntity entity)
            where T : ContenderNote, new()
        {
            if (entity == null)
            {
                return(null);
            }

            return(new T
            {
                Id = entity.id,
                CreatedTime = entity.createdTime,
                UpdatedTime = entity.lastUpdatedTime,
                Text = entity.text,
                ContenderId = entity.candidateId,
                OwnerId = entity.searcherId,
                SharedWithId = entity.sharedWithId,
            });
        }
Пример #3
0
 partial void DeleteCandidateNoteEntity(CandidateNoteEntity instance);
Пример #4
0
 partial void InsertCandidateNoteEntity(CandidateNoteEntity instance);
Пример #5
0
 public static void MapTo(this ContenderNote note, CandidateNoteEntity entity)
 {
     entity.lastUpdatedTime = note.UpdatedTime;
     entity.text            = note.Text;
     entity.sharedWithId    = note.SharedWithId;
 }