ecengel
9/26/2018 - 4:25 AM

Contacts Program V4

internal class Program
    {
        private readonly ContactService _service;

        public Program(ContactService service)
        {
            _service = service;
        }

        private void Main(string[] args)
        {
            var queryOption = new QueryOption();
            queryOption.Filter = x => x.Age == 10;
            queryOption.EagerLoads = new Expression<Func<Contact, object>>[]
            {
                x => x.EmailAddresses
            };
            var contacts = _service.Contacts(queryOption);
        }
    }