public Database() { // Создаем объект контекста EF, указываем ему строку соединения и // получаем объект настроек для конструктора объекта контекста EF var options = new DbContextOptionsBuilder <MyLibraryContext>() .UseSqlServer(GlobalOptions.ConnectionString) .Options; // Создаем контекст EF context = new MyLibraryContext(options); }
public BibliotecaAtivoService(MyLibraryContext context) { _context = context; }
public AuthorService(MyLibraryContext context) { _context = context; }
public SearchModel(MyLibraryContext context) : base(context) { this.SearchResults = new List <SearchViewModel>(); }
public BasePageModel(MyLibraryContext context) { this.Context = context; }
public CheckOutService(MyLibraryContext context) { _context = context; }
public IndexModel(MyLibraryContext context) : base(context) { }
public BorrowModel(MyLibraryContext context) : base(context) { this.BorrowDate = DateTime.Today; }
public AddModel(MyLibraryContext context) { this.context = context; }
public DetailsModel(MyLibraryContext context) { this.context = context; }
public IndexModel(MyLibraryContext context) { this.context = context; }
public BooksService(MyLibraryContext context) { _context = context; }
public SearchModel(MyLibraryContext context) { this.context = context; this.SearchResult = new List <SearchViewModel>(); }
public AddModel(MyLibraryContext context) : base(context) { }
public StatusModel(MyLibraryContext context) : base(context) { }
public DetailsModel(MyLibraryContext context) : base(context) { }
public BorrowModel(MyLibraryContext context) { this.context = context; this.StartDate = DateTime.UtcNow; this.Borrowers = new List <SelectListItem>(); }