Created
February 12, 2012 03:58
-
-
Save tawman/1806138 to your computer and use it in GitHub Desktop.
An example ASP.NET MVC3 Controller wired up with a DoddleReport ReportResult Action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using DoddleReport; | |
using DoddleReport.Web; | |
using PetaPocoPivot.Services; | |
namespace PetaPocoPivot.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly IRepository _repository = new Repository(); | |
public ActionResult Index() | |
{ | |
var results = _repository.GetEmployeeReport(); | |
return View(results); | |
} | |
public ReportResult PivotReport() | |
{ | |
var results = _repository.GetEmployeeReport(); | |
var report = new Report(results.ToReportSource()); | |
return new ReportResult(report); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment