Skip to content

Instantly share code, notes, and snippets.

@komainu85
Created March 20, 2015 13:20
Show Gist options
  • Save komainu85/a79706241fec083df20e to your computer and use it in GitHub Desktop.
Save komainu85/a79706241fec083df20e to your computer and use it in GitHub Desktop.
EntityController
[ServicesController]
public class EntityController : EntityService<Entity>
{
private ICustomRepositoryActions<Entity> _customRepositoryActions;
public EntityController(ICustomRepositoryActions<Entity> repository)
: base(repository)
{
_customRepositoryActions = repository;
}
public EntityController()
: this(new EntityRespository())
{
}
[HttpGet]
[ActionName("DoSomethingCustom")]
public string Get()
{
return _customRepositoryActions.DoSometingCustom();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment