Accessing row count from View

Topics: Customizing Orchard, Troubleshooting
Jul 17, 2011 at 4:09 AM


I am using the oforms module to capture form submissions, and wanted to display a simple count on the homepage of the number of people who had signed the form. Is there a simple way to access the oforms repository in a view, rather than having to go to the trouble of creating my own module, or adding a widget to the oforms module? I just need something quick and dirty. I don't really understand how the IOrchardServices/IContentManager interfaces work, sorry.

This is how the oforms module accesses the data:


var form = this._contentManager.Get<OFormPart>(id, VersionOptions.Latest);

var formResults = _resultsRepo.Table.Where(x => x.OFormPartRecord == form.Record);


Thanks in advance