Skip to content

Instantly share code, notes, and snippets.

@lancscoder
Created March 18, 2012 11:39
Show Gist options
  • Save lancscoder/2070764 to your computer and use it in GitHub Desktop.
Save lancscoder/2070764 to your computer and use it in GitHub Desktop.
DapperDinner Part 3 Object State
public interface IDinnerRepository
{
Dinner NewDinner();
RSVP NewRsvp(int dinnerId);
PagedList<Dinner> FindByLocation(float latitude, float longitude, string orderBy = "DinnerID", int page = 1, int pageSize = 20);
PagedList<Dinner> FindUpcomingDinners(string orderBy = "DinnerID", int page = 1, int pageSize = 20);
PagedList<Dinner> FindUpcomingDinners(DateTime? eventDate, string orderBy = "DinnerID", int page = 1, int pageSize = 20);
PagedList<Dinner> FindDinnersByText(string q, string orderBy = "DinnerID", int page = 1, int pageSize = 20);
IEnumerable<Dinner> AllDinnersByUser(string name);
Dinner Find(int id);
void InsertOrUpdate(Dinner dinner);
void InsertOrUpdate(RSVP rsvp);
void Delete(int id);
void DeleteRsvp(RSVP rsvp);
}
public interface ITracker
{
ObjectState State { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment