Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public class ContentTypeController : ODataBaseController, IContentTypeController
  2. {
  3.  
  4. // add repository reference
  5. //private readonly IRepository<ContentType> _repository;
  6.  
  7. private ProjectV001Context _db = new ProjectV001Context();
  8. private readonly IUnitOfWork _uow;
  9.  
  10. public ContentTypeController(IUnitOfWork unitOfWork)
  11. {
  12. _uow = unitOfWork;
  13. }
  14. . . .
  15.  
  16. var results = odataQueryOptions.ApplyTo(_uow.Repository<ContentType>()
  17. .Query()
  18. .Get() . . .
  19.  
  20. public ContentTypeController(IUnitOfWork unitOfWork, IRepository<ContentType> repository)
  21. {
  22. _uow = unitOfWork;
  23. _repository = repository;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement