You can overcome this scenario by replacing:
using System.Data.Objects;
With:
using System.Data.Entity.Core.Objects;
You may need to update the using statements in your T4 templates, like your Context.tt file, so that auto-generated files continue to work when re-generating.
Before

After
