Home
Github
Wiki
Videos
Contact
Sponsor
Accessing content revisions from the database
your ViewModels are saved in the database, in the `PuckRevision` table. to work with revisions from the database, you can inject `I_Puck_Repository` into your controller or work directly with the entity framework context, `PuckContext`. the puck repository has many useful methods for retrieving content and i may get around to documenting them but for now you can view the source code for the available methods [Puck_Repository](https://github.com/yohsii/puck-core/blob/master/core/Concrete/Puck_Repository.cs). note that the repository returns the entity `PuckRevision`. you can obtain your original ViewModel from a `PuckRevision` by doing the following: ```cs var homepage = homepageRevision.ToBaseModel() as Homepage; ```