Only block entityFramework if it contains the object