using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.Objects;
using System.Data.EntityClient;


namespace GeekSpeakWCFDemo
{
	public class PocoContext : ObjectContext
	{
		public const string ConnectionString = "name=EFDemoEntities";
		public const string ContainerName = "EFDemoEntities";

		public PocoContext()
            : base(ConnectionString, ContainerName)
        {
            this.ContextOptions.LazyLoadingEnabled = true;
        }


		public ObjectSet<Address> Addresses
		{
			get { return _addresses ?? (_addresses = CreateObjectSet<Address>("Addresses")); }
		}
		private ObjectSet<Address> _addresses;

		public ObjectSet<Person> People
		{
			get { return _people ?? (_people = CreateObjectSet<Person>("People")); }
		}
		private ObjectSet<Person> _people;
	}
}
