This may sound quite wired actually that one would extract the Sitecore item from the Glass Mapper’s model,but yes we did that recently.
This is tiny piece of code to show how we can convert from the GlassMapper’s object (for example from the SitecoreContext.Model object) to Sitecore item.
Option #1 Using the GlassMapper’s GetItem method:
We use this method to convert our Model into different-different GlassMapper Models,such as :
If we want to convert the Model into Products Model:
So we can use this method to convert the model into Sitecore item as well:
Caution:we should cache the SitecoreContext.
Option #2 The traditional way:
var item=Sitecore.Context.Database.GetItem(new Guid(Model.Id));