.NET 4 Code Contracts: “requires unproven: source != null”
I just started using code contracts in my project. However, I have a problem with my repository implementation, which queries my database using the Entity Framework. I have the following method: public IEnumerable<Organization> GetAllOrganizations() { return _uow.CreateSet<Party>().OfType<Organization>().AsEnumerable(); } The method returns a collection containing all organizations in the database, or an empty collection there's not organizations in the database. However, this is not okay according to CodeContracts, which give me the error: "requires unproven: source != null" What is it trying