Arc.Unit.Tests.Infrastructure.Data.NHibernate.CriteriaExamples.Should_create_property_equals_property_criteria C# (CSharp) Méthode

Should_create_property_equals_property_criteria() private méthode

private Should_create_property_equals_property_criteria ( ) : void
Résultat void
        public void Should_create_property_equals_property_criteria()
        {
            var expected = DetachedCriteria.For<Person>()
                .CreateAlias("Contacts", "contact", JoinType.InnerJoin)
                .Add(Restrictions.EqProperty("contact.FirstName", "FirstName"));

            var contact = Alias.From<Person>(x => x.Contacts).For<Person>();

            var actual = Criteria.For<Person>()
                .InnerJoin(() => contact)
                .With<Person>(x => contact.FirstName == x.FirstName);

            AssertCriteria.AreEqual(actual, expected);
        }