Point being, once you've got your functions ready to go, it's easy to change it to this:
Public Function GetMuleRouteData(QueryDate as Date, MinimumDropBoxes as Integer, MinimumStashHouses as Integer) As IQueryable(Of GeoMulesDataRow)
Return (From GeoMulesDataRow In entities.GeoMulesData
Where ((GeoMulesDataRow.DropBoxesCount >= MinimumDropBoxes) And
(GeoMulesDataRow.StashHousesCount >= MinimumStashHouses) And
(GeoMulesDataRow.VisitDate = QueryDate))
Select GeoMulesDataRow)
End Function
Now, you can SEND the minimum number of drop boxes and stash houses, and let the function do all the work. Now, instead of 2000 mules, you get 54,000. Note that I took out the DeviceId parameter, which defeated the purpose of the overall function.
Of course, there's a 100 different ways to do this. This is just an easy example.
Double07 · 2022-05-12 04:01 · 0 votes