internal static Exception AssociatedObjectNotFound(object key, Type type, ProjectionObject projectionObject) { var message = string.Format ( "Associated object not found for key '{0}' in {1}. Expected type: {2}", key, projectionObject.ToString(), type.GetPrettyName(qualified: true) ); return new KeyNotFoundException(message); }