public void TestLambdaExpressionGenericExtension() { var personEntity = new PersonEntity() { Name = "Me", Age = 1, //Movies = new Collection<MovieEntity>() { new MovieEntity() { Name = "Rambo", Id = 1 } }, Location = new Location() { Address1 = "abc", Address2 = "def", City = "ghij", State = "kl", Zip = 12345 } }; PersonModel personModel = personEntity.ConvertUsingLambdaNotation <PersonEntity, PersonModel>(); Assert.IsTrue(personModel.Name == personEntity.Name && personEntity.Location.Address1 == personModel.Location.Address1); }