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.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
using StructureMap; | |
namespace Sample.Web.Helpers | |
{ | |
public class StructureMapFilterProvider : FilterAttributeFilterProvider | |
{ | |
public StructureMapFilterProvider(IContainer container) |
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.Collections.Generic; | |
using PetaPoco; | |
using PetaPocoPage.Models; | |
namespace PetaPocoPage.Services | |
{ | |
public class Repository | |
{ | |
private readonly Database _database = new Database("PetaPocoPageDb"); |
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.Globalization; | |
using System.Linq; | |
using PetaPoco; | |
using PetaPocoPage.Models; | |
namespace PetaPocoPage.Helpers | |
{ | |
public class DataTablesFormat | |
{ | |
public static object PageResponse(DataTablesPageRequest pageRequest, Page<Customer> report) |
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 PetaPocoPage.Helpers; | |
using PetaPocoPage.Models; | |
using PetaPocoPage.Services; | |
namespace PetaPocoPage.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly Repository _repository = new Repository(); |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using PetaPocoPage.Models; | |
namespace PetaPocoPage.Helpers | |
{ | |
public class DataTablesModelBinder : IModelBinder |
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
@{ | |
ViewBag.Title = "Server-Side Paging with PetaPoco DataTables"; | |
} | |
<table id="customers" class="table table-striped table-condensed"> | |
<thead> | |
<tr> | |
<th style='width: 4%'>Id</th> | |
<th>Last</th> | |
<th>First</th> |
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(); |
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.Collections.Generic; | |
using PetaPoco; | |
namespace PetaPocoPivot.Services | |
{ | |
public class Repository : IRepository | |
{ | |
private readonly Database _database = new Database("AdventureWorks"); | |
public IEnumerable<dynamic> GetEmployeeReport() |
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.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using DoddleReport; | |
namespace Hasc.Web.Helpers | |
{ | |
public static class DynamicReportSourceExtensions | |
{ | |
public static IReportSource ToReportSource(this IEnumerable<dynamic> source) |
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.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace DoddleReport | |
{ | |
public static class DynamicReportSourceExtensions | |
{ | |
public static IReportSource ToReportSource(this IEnumerable<dynamic> source) | |
{ |