Beispiel #1
0
    public Database()
    {
        // Создаем объект контекста EF, указываем ему строку соединения и
        // получаем объект настроек для конструктора объекта контекста EF
        var options =
            new DbContextOptionsBuilder <MyLibraryContext>()
            .UseSqlServer(GlobalOptions.ConnectionString)
            .Options;

        // Создаем контекст EF
        context = new MyLibraryContext(options);
    }
 public BibliotecaAtivoService(MyLibraryContext context)
 {
     _context = context;
 }
Beispiel #3
0
 public AuthorService(MyLibraryContext context)
 {
     _context = context;
 }
Beispiel #4
0
 public SearchModel(MyLibraryContext context)
     : base(context)
 {
     this.SearchResults = new List <SearchViewModel>();
 }
Beispiel #5
0
 public BasePageModel(MyLibraryContext context)
 {
     this.Context = context;
 }
Beispiel #6
0
 public CheckOutService(MyLibraryContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public IndexModel(MyLibraryContext context)
     : base(context)
 {
 }
Beispiel #8
0
 public BorrowModel(MyLibraryContext context)
     : base(context)
 {
     this.BorrowDate = DateTime.Today;
 }
Beispiel #9
0
 public AddModel(MyLibraryContext context)
 {
     this.context = context;
 }
Beispiel #10
0
 public DetailsModel(MyLibraryContext context)
 {
     this.context = context;
 }
Beispiel #11
0
 public IndexModel(MyLibraryContext context)
 {
     this.context = context;
 }
Beispiel #12
0
 public BooksService(MyLibraryContext context)
 {
     _context = context;
 }
Beispiel #13
0
 public SearchModel(MyLibraryContext context)
 {
     this.context      = context;
     this.SearchResult = new List <SearchViewModel>();
 }
Beispiel #14
0
 public AddModel(MyLibraryContext context)
     : base(context)
 {
 }
Beispiel #15
0
 public StatusModel(MyLibraryContext context)
     : base(context)
 {
 }
Beispiel #16
0
 public DetailsModel(MyLibraryContext context)
     : base(context)
 {
 }
Beispiel #17
0
 public BorrowModel(MyLibraryContext context)
 {
     this.context   = context;
     this.StartDate = DateTime.UtcNow;
     this.Borrowers = new List <SelectListItem>();
 }