Skip to content

Instantly share code, notes, and snippets.

@micahasmith
Created October 3, 2011 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micahasmith/1258243 to your computer and use it in GitHub Desktop.
Save micahasmith/1258243 to your computer and use it in GitHub Desktop.
The Repository Pattern in .NET
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
}
public void Update(PersonDTO person)
{
//update a person here
}
public void Delete(PersonDTO person)
{
//guess
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment