I am trying to migrate Sitecore items from Sitecore 8.1 to Sitecore 10.1.2. During migration I have got an error as 'Item' does not contain a definition for 'GlassCast' and no accessible extension method 'GlassCast' Below is my code
public IMap GetMapItem()
{
if (this.ContextItem.IsDerived(Templates.Map.ID))
return this.ContextItem.GlassCast<IMap>();
return null;
}