Skip to content

Instantly share code, notes, and snippets.

@komainu85
Created March 22, 2015 16:47
Show Gist options
  • Save komainu85/278da0140baf5c7e2fec to your computer and use it in GitHub Desktop.
Save komainu85/278da0140baf5c7e2fec to your computer and use it in GitHub Desktop.
Sitecore Entity Service Pages Service Controller
[ServicesController]
public class EntityController : EntityService<Entity>
{
private ICustomRepository<Entity> _customRepository;
public EntityController(ICustomRepository<Entity> repository)
: base(repository)
{
_customRepository = repository;
}
public EntityController()
: this(new EntityRespository())
{
}
[HttpGet]
[ActionName("GetAllPaged")]
public List<Entity> Get(int pageSize, int page)
{
return _customRepository.GetAll(pageSize,page);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment