How do I prevent multiple trackings and unique constraint error - C#