static void Main(string[] args) { var db = new BookStoreContext(); var booksParser = new XmlParser(db, @"..\..\..\complex-books.xml"); var booksToAdd = booksParser.GetBooksFromXML(); foreach (var book in booksToAdd) { db.Books.Add(book); db.SaveChanges(); } var queriesParser = new XmlParser(db, @"..\..\..\reviews-queries.xml"); queriesParser.GenerateQueryResults(); }
public IndexModel(BookStore.Data.BookStoreContext context) { _context = context; }
public DetailsModel(BookStore.Data.BookStoreContext context) { _context = context; }
public CreateModel(BookStore.Data.BookStoreContext context) { _context = context; }
public CreateModel(BookStore.Data.BookStoreContext context, IWebHostEnvironment webHostEnvironment) { _context = context; _webHostEnvironment = webHostEnvironment; }
public UserRepository(BookStoreContext ctx, IMapper mapper) : base(ctx, mapper) { }
public DbInitializer(BookStoreContext db, UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager) { _db = db; _userManager = userManager; _roleManager = roleManager; }
public DeleteModel(BookStore.Data.BookStoreContext context) { _context = context; }
public GenericRepository(BookStoreContext ctx, IMapper mapper) { _ctx = ctx; _mapper = mapper; }
public EditModel(BookStore.Data.BookStoreContext context) { _context = context; }
public UnitOfWork(BookStoreContext _ctx, IMapper _mapper) { ctx = _ctx; mapper = _mapper; }
public IndexModel(BookStoreContext context, IConfiguration configuration) { _context = context; Configuration = configuration; }