Readme example has small error with Save. #105

Closed
jbtule opened this Issue Nov 11, 2011 · 1 comment

Projects

None yet

2 participants

@jbtule

Came across this issue of documentation due to a question on stack overflow.

In your readme you have the following code.

var table = new Products();
//OH NO YOU DIDN't just pass in an integer inline without a parameter! 
//I think I might have... yes
var drinks = table.All("WHERE CategoryID = 8");
//what we get back here is an IEnumerable < ExpandoObject > - we can go to town
foreach(var item in drinks){
    //turn them into Haack Snacks
    item.CategoryID = 12;
}
//Let's update these in bulk, in a transaction shall we?
table.Save(drinks);

drinks is an IEnumerable<dynamic> but Save takes a params object[] so the drinks is treated like one entity to save.

@robconery
Collaborator

Thanks...

@robconery robconery closed this Dec 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment