LLBLGen 2.6
I've got a situation where I want to pull multiple property values from a single entity stored in an IEnumerable. First, let's fill up the enumerable collection:
IEnumerable<ActionTaskEntity> actions = FetchActionsFromDatabase();
...now, I want to display the timestamp and user who performed that action in a web page. So, I can now do multiple First() fetches:
string displayString = string.Format("Page Viewed at {0} by {1}", actions.First().ActionDate, actions.First().ActionUser);
...or I could fetch back into the LLBLGen entity and use that:
ActionTaskEntity action = actions.First();
string displayString = string.Format("Page Viewed at {0} by {1}", action.ActionDate, action.ActionUser);
...now, I fully understand that in this example there is probably not very much difference at all between the two, but as we all understand, multiplied over time and for multiple users, it could make a difference. And, even if only using the "First" function twice is not enough, what if I used it five times in one string building operation? What about 10? When does it suddenly make a difference?