Added the implementation for the GenericRepository->Update(entity) with primary key detection