How can I wrap/convert/cast a ListItem to the generated spmetal class ? (linq 2 sharepoint)
Thanks!
Update:
I'm looking for these because event receivers make use of splistitems and i want to use the strong type version and no magiv strings when accessing data
Is there a reason you have a ListItem instead of using LINQ to SharePoint to get your spmetal class?
To my knowledge there is no built in way but you could use a tool like automapper to do this.
Another way of doing this would be to use LINQ to SharePoint and just create a query to get this like
Unless you are given a SPListItem (Event Receiver and workflows) I would try to use this instead of getting a SPListItem (Unless you have a complex query that doesn't perform well then)