public int Update(NoteDTO noteToUpdate)
 {
     var noteEntity = new Note();
     noteEntity.InjectFrom<LoopValueInjection>(noteToUpdate);
     noteEntity.InjectFrom<MapEnum>(new { EntityState = noteToUpdate.EntityStateDTO });
     _noteRepo.Update(noteEntity);
     return _unitOfWork.Save();
 }
 public void Save(NoteDTO noteToSaveDTO)
 {
     //var noteToSave = noteToSaveDTO.ConvertToDomain();
     var noteEntity = new Note();
     noteEntity.InjectFrom<LoopValueInjection>(noteToSaveDTO);
     noteEntity.InjectFrom<MapEnum>(new { EntityState = noteToSaveDTO.EntityStateDTO });
     noteEntity.EntityState = EntityState.Added;
     _noteRepo.Add(noteEntity);
     _unitOfWork.Save();
 }