Ejemplo n.º 1
0
        public void ContainsExactEntity()
        {
            var entityCollection = new DbEntityCollection <EntityCollectionModel>();
            var entity           = new EntityCollectionModel
            {
                Id = "ABC"
            };

            entityCollection.Add(entity);

            Assert.IsTrue(entityCollection.Contains(entity));
        }
Ejemplo n.º 2
0
        public void ContainsEntityById()
        {
            var entityCollection = new DbEntityCollection <EntityCollectionModel>();
            var entity           = new EntityCollectionModel
            {
                Id    = "ABC",
                Title = "1"
            };

            entityCollection.Add(entity);

            var idMatchingEntity = new EntityCollectionModel
            {
                Id = "ABC"
            };

            Assert.IsTrue(entityCollection.Contains(idMatchingEntity));
        }