/// <summary> /// The constructor initializes the instance of this class. /// </summary> public PeopleController() { var connectionString = ConfigurationManager.ConnectionStrings["peopleManagerEntities"].ConnectionString; this.peopleDataContext = new PeopleDataContext(connectionString); this.repository = new PersonRepository(this.peopleDataContext); }
public _Default(IPeopleDataContext peopleDataContext) { _peopleDataContext = peopleDataContext; }
/// <summary> /// The constructor initializes a new instance of this class. /// <param name="peopleDataContext">The instance of the data context to use</param> /// </summary> public PersonRepository(IPeopleDataContext peopleDataContext) { this.peopleDataContext = peopleDataContext; }