Skip to content

Instantly share code, notes, and snippets.

@chandermani
Created April 21, 2014 04:39
Show Gist options
  • Save chandermani/11132420 to your computer and use it in GitHub Desktop.
Save chandermani/11132420 to your computer and use it in GitHub Desktop.
Multiple queries with PetaPoco
var planEmployees = this.DB
.Query<Xhr.Data.Model.EmployeeLeavePlanView>("WHERE LeavePlanId=@0", p.Id);
planEmployees.ForEach(e =>
{
var creditHistory = this.LeavesService.GetCredits(e.ID);
var newCredits = creditCalculator.CalculateNewCredits(processStartTime, creditHistory);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment