EF 4: Get Stored Procedures or View with System.NullReferenceException
Error: System.NullReferenceException: Object reference not set to an instance of an object.at System.Data.EntityKey.AddHashValue(Int32 hashCode, Object keyValue)at System.Data.EntityKey.GetHashCode()at System.Collections.Generic.GenericEqualityComparer`1.GetHashCode(T obj)at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)at System.Data.Objects.ObjectStateManager.TryGetEntityEntry(EntityKey key, EntityEntry& entry)at System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)at lambda_method(Closure , Shaper )at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext() Problem: The Views/Stored Procedure was returning a null…