Let's say that you Create someObject based on a class generated by SPMetal. Let's also say that this object is suitable for passing to the InsertOnSubmmit method of the data context. Then you call the following to insert the item into the root of the list:
Now you want to insert that item into a folder in the list, called Folder1. What you need to do is use the Path property on the someObject. This property is present if you use SPMetal to generate the Linq classes.
I created a folder in my SomeList called Folder1, and then I set the Path property like so:
mynewObject.Path = "/Lists/MyList/Folder1";
Then call the InsertOnSubmit method as usual and your item will be in the right folder! I am not yet sure how to create the folder through linq, and do note that exceptions are thrown if the folder is not there. I'll try to solve that one in a later post.