Example #1
0
        public void Lambda_returns_property_accessor_when_one()
        {
            var code   = new CSharpCodeHelper();
            var member = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Id");

            Assert.Equal("e => e.Id", code.Lambda(member));
        }
Example #2
0
        public void Lambda_returns_anonymous_type_when_one()
        {
            var code = new CSharpCodeHelper();
            var id   = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Id");
            var name = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Name");

            Assert.Equal("e => new { e.Id, e.Name }", code.Lambda(new[] { id, name }));
        }
        public void Lambda_returns_anonymous_type_when_one()
        {
            var code = new CSharpCodeHelper();
            var id = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Id");
            var name = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Name");

            Assert.Equal("e => new { e.Id, e.Name }", code.Lambda(new[] { id, name }));
        }
        public void Lambda_returns_property_accessor_when_one()
        {
            var code = new CSharpCodeHelper();
            var member = Model.ConceptualModel.EntityTypes.First().Properties.First(p => p.Name == "Id");

            Assert.Equal("e => e.Id", code.Lambda(member));
        }