Adds unit test to reproduce LingRepository Insert defect.

Improved LinqRepository Insert exceptiopn handling.