Created
October 3, 2011 01:22
-
-
Save micahasmith/1258237 to your computer and use it in GitHub Desktop.
The Classic DAL in .NET
This file contains 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) | |
{ | |
// Queries the database for the particular user identified by | |
// personID. If the user is located then the DataSet contains a | |
// single record corresponding to the requested user. If the user | |
// is not found then the DataSet does not contain any records. | |
} | |
public bool Person_Save(ref int personID, string fname, string lname, DateTime dob) | |
{ | |
// Locates the record for the given personID. If the record exists, | |
// the method updates the record. If the record does not exist, the | |
// method adds the record and sets the personID variable equal to | |
// the identity value assigned to the new record. Then the method | |
// returns the value to the business layer because personID is | |
// marked with the ref modifier. | |
} | |
public int Person_DeleteInactive() | |
{ | |
//Deletes all inactive people in the database and returns a value | |
//indicating how many records were deleted. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment