Created
March 22, 2015 16:47
-
-
Save komainu85/278da0140baf5c7e2fec to your computer and use it in GitHub Desktop.
Sitecore Entity Service Pages Service Controller
This file contains 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
[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