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); }
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, }); }
partial void DeleteCandidateNoteEntity(CandidateNoteEntity instance);
partial void InsertCandidateNoteEntity(CandidateNoteEntity instance);
public static void MapTo(this ContenderNote note, CandidateNoteEntity entity) { entity.lastUpdatedTime = note.UpdatedTime; entity.text = note.Text; entity.sharedWithId = note.SharedWithId; }