public UnitOfWork(BookServiceContext context) { _context = context; Books = new BookRepository(_context); Users = new UserRepository(_context); UserBooks = new UserBookRepository(_context); RegisteredApiUsers = new RegisteredApiUserRepository(_context); }
public override void OnAuthorization(System.Web.Http.Controllers.HttpActionContext actionContext) { var environmentId = actionContext.Request.GetUserAccessToken(); using (var db = new BookServiceContext()) { var environment = db.Environments.Find(environmentId); if (environment == null) { //throw new HttpResponseException(HttpStatusCode.Forbidden); var host = actionContext.Request.RequestUri.DnsSafeHost; actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.NotFound); actionContext.Response.Headers.Add("NoStore", string.Format("No store \"{0}\"", environmentId)); } } base.OnAuthorization(actionContext); }
public AuthorsController(BookServiceContext context) { _context = context; }
public PublisherRepository(BookServiceContext context, IMapper mapper) : base(context, mapper) { }
/// <summary> /// This will create the books controller version 2 /// </summary> /// <param name="context">The book service context, this will be injected</param> public BooksV2Controller(BookServiceContext context) { db = context; }
public Repository(BookServiceContext context) { db = context; }
public RegisteredApiUserRepository(BookServiceContext context) : base(context) { }
public BookRepository(BookServiceContext context) : base(context) { }
public PublisherRepository(BookServiceContext context) : base(context) { }
public MappingRepository(BookServiceContext bookserviceContext, IMapper mapper) : base(bookserviceContext) { this.mapper = mapper; }
public BooksController(BookServiceContext db) { _db = db; }
public RatingRepository(BookServiceContext context) : base(context) { }
//nodig voor de injectie public PublisherRepository(BookServiceContext context) { bookServiceContext = context; }
public ReaderRepository(BookServiceContext context) : base(context) { }
public UnitOfWork(BookServiceContext context) { this.context = context; BooksRepository = new BookRepository(context); AuthorsRepository = new AuthorRepository(context); }
//private BookServiceContext bookServiceContext; public AuthorRepository(BookServiceContext context) : base (context) { //bookServiceContext = context; }
public CompletedOrdersController(BookServiceContext context) { _context = context; }
public PhysicalBooksController(BookServiceContext context) { _context = context; }
public BookRepository(BookServiceContext context) { bookServiceContext = context; }
public BooksController(BookServiceContext context) { _context = context; }
public AuthorRepository(BookServiceContext context) { bookServiceContext = context; }
public AuthorsController(BookServiceContext db) { _db = db; }