This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function PeopleRepository() { | |
| //when using constructor functions like this one to create objects in js, | |
| //always make sure you're doing so with the new keyword | |
| //or the scope will be off | |
| // | |
| //like so: | |
| if(!(this instanceof PeopleRepository) { | |
| return new PeopleRepository(); | |
| //we just enforced new | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PeopleRepository | |
| { | |
| public List<PersonDTO> Get() | |
| { | |
| //return a list of person data transfer objects here | |
| } | |
| public void Insert(PersonDTO person) | |
| { | |
| //insert a person here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PeopleDAL | |
| { | |
| public DataSet Person_GetAll() | |
| { | |
| //Returns a DataSet containing all people records in the database. | |
| } | |
| public DataSet Person_GetByPersonID(int personID) | |
| { |
NewerOlder