Ejemplo n.º 1
0
 public GenreController(BookstoreContext ctx) => data = new Repository <Genre>(ctx);
Ejemplo n.º 2
0
 public ImportService(BookstoreContext context)
 {
     this.context = context;
 }
Ejemplo n.º 3
0
 public CartController(BookstoreContext ctx) => data = new Repository <Book>(ctx);
Ejemplo n.º 4
0
 public EfGetSingleAuthor(BookstoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 5
0
 public BookController(BookstoreContext ctx) => data = new BookstoreUnitOfWork(ctx);
Ejemplo n.º 6
0
 public DbUseCaseLogger(BookstoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 7
0
 public AuthorsController(BookstoreContext db)
 {
     this.db = db;
 }
Ejemplo n.º 8
0
 public BooksRepository(BookstoreContext db)
 {
     this.db = db;
 }
Ejemplo n.º 9
0
 public Repository(BookstoreContext ctx)
 {
     context = ctx;
     dbSet   = context.Set <T>();
 }
Ejemplo n.º 10
0
 public PrivilegedClientController(BookstoreContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public BookstoreOrdersController(BookstoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 12
0
 public BookStoreUnitOfWork(BookstoreContext ctx)
 {
     context = ctx;
 }
Ejemplo n.º 13
0
 public WarehouseService(BookstoreContext context)
 {
     this.context = context;
 }
Ejemplo n.º 14
0
 public BookstoreUnitOfWork(BookstoreContext ctx) => context = ctx;
Ejemplo n.º 15
0
 public ImageRepository(BookstoreContext context)
 {
     this._context = context;
 }
Ejemplo n.º 16
0
 public BookstoreController(BookstoreContext context, IConfiguration configuration)
 {
     _context = context;
     ny       = new NYTimesDAL(configuration);
 }
Ejemplo n.º 17
0
 // Fully sets up the HomeIndexViewModel by calling its extension methods defined below
 public static void FullSetUp(this HomeIndexViewModel homeIndexVM, BookstoreContext db)
 {
     homeIndexVM.SetFeaturedBooks(db);
     homeIndexVM.SetSections(db);
     homeIndexVM.SetOtherGenres(db);
 }
Ejemplo n.º 18
0
 public BooksRepository(BookstoreContext context)
 {
     context.Database.EnsureCreated();
     _context = context;
 }
Ejemplo n.º 19
0
 public EfDeleteAuthorCommand(BookstoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 20
0
 public EfUpdateRoleCommand(BookstoreContext context, UpdateRoleValidator validator)
 {
     _context   = context;
     _validator = validator;
 }
Ejemplo n.º 21
0
 protected ControllerContext(BookstoreContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Ejemplo n.º 22
0
        private static void AddTestData(BookstoreContext context)
        {
            context.Books.Add(new Book
            {
                Title          = "Where the Red Fern Grows",
                Description    = "Where the Red Fern Grows is a 1961 children's novel...",
                PublishedMonth = 0,
                PublishedDay   = 0,
                PublishedYear  = 1961,
                CoverImageUrl  = "//via.placeholder.com/100x100"
            });

            context.Books.Add(new Book
            {
                Title          = "Another Book",
                Description    = "...",
                PublishedMonth = 4,
                PublishedDay   = 1,
                PublishedYear  = 1975,
                CoverImageUrl  = "//via.placeholder.com/100x100"
            });


            context.Authors.Add(new Author
            {
                FirstName        = "Wilson",
                LastName         = "Rawls",
                HeadshotImageUrl = "//via.placeholder.com/100x100"
            });

            context.Authors.Add(new Author
            {
                FirstName        = "Mark",
                LastName         = "Twain",
                HeadshotImageUrl = "//via.placeholder.com/100x100"
            });

            context.Authors.Add(new Author
            {
                FirstName        = "John",
                LastName         = "Smith",
                HeadshotImageUrl = "//via.placeholder.com/100x100"
            });

            context.BookAuthors.Add(new BookAuthor
            {
                BookID   = 1,
                AuthorID = 1
            });

            context.BookAuthors.Add(new BookAuthor
            {
                BookID   = 1,
                AuthorID = 2
            });

            context.BookAuthors.Add(new BookAuthor
            {
                BookID   = 2,
                AuthorID = 3
            });

            context.Reviews.Add(new Review
            {
                BookID        = 1,
                ReviewerName  = "John Smith",
                ReviewContent = "Great book!",
                Rating        = 5,
                DatePublished = new DateTime()
            });

            context.Reviews.Add(new Review
            {
                BookID        = 1,
                ReviewerName  = "Bill Jones",
                ReviewContent = "One of the best classics, but sad :-(",
                Rating        = 4,
                DatePublished = new DateTime()
            });

            context.SaveChanges();
        }
Ejemplo n.º 23
0
 public EfGetLogs(BookstoreContext context)
 {
     _context = context;
 }
Ejemplo n.º 24
0
 public ValidationController(BookstoreContext ctx)
 {
     authorData = new Repository <Author>(ctx);
     genreData  = new Repository <Genre>(ctx);
 }
Ejemplo n.º 25
0
 public AuthorController(BookstoreContext ctx) => data = new Repository <Author>(ctx);
Ejemplo n.º 26
0
 public BookStoreUnitOfwork(BookstoreContext ctx)
 {
     this.ctx = ctx;
 }
Ejemplo n.º 27
0
 public CaseController(BookstoreContext context, IMapper mapper) : base(context, mapper) {}
Ejemplo n.º 28
0
 public EfGetSingleOrder(BookstoreContext context, IApplicationActor actor)
 {
     _context = context;
     _actor   = actor;
 }
Ejemplo n.º 29
0
 public UserRepository(BookstoreContext context)
 {
     this._context = context;
 }
Ejemplo n.º 30
0
 protected void Init()
 {
     Database.SetInitializer<BookstoreContext>(new LocalDbContextInitializer());
     Context = new BookstoreContext(connString);
 }
Ejemplo n.º 31
0
 public CustomerController(BookstoreContext context)
 {
     _context = context;
 }