Entity Framework 6 Cannot build after adding stored procedures to data model

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

enter image description here

After

enter image description here

Leave a Comment