When i try to use the Linq in my SharePoint 2010 custom web part, i try to use the SPMetal.exe to generate the classes which is required for the Linq, but unfortunately its not generating the members for the publishing image fields and created by/Modified by columns. I found a good article here, which is says that we need to add the attributes manually in-order to achieve this functionalities.
The following is the code snippet which we need to add into the class file which is generated by SPMetal.exe .
private Microsoft.SharePoint.Publishing.Fields.ImageFieldValue _publishingRollupImage;
[Microsoft.SharePoint.Linq.ColumnAttribute(Name = “PublishingRollupImage”, Storage = “_publishingRollupImage”, FieldType = “Image”)]
public Microsoft.SharePoint.Publishing.Fields.ImageFieldValue PublishingRollupImage
if (value != this._publishingRollupImage)
this._publishingRollupImage = value;
Thanks to the author Billets liés who published the very good article.