public ActionResult BorrowList() { LibraryAppContext dbContext = new LibraryAppContext(); DateTime today = DateTime.Today; var viewmodelResult = from p in dbContext.Readers join k in dbContext.Books on p.ID equals k.ReaderId where k.ReaderId != null && k.ReturnDate < today select new BorrowIndex { reader = p, book = k }; return(View(viewmodelResult)); }
/// <summary> /// Constructor which creates a repository object /// </summary> /// <param name="context">Database Context</param> public Repository(LibraryAppContext context) { m_Context = context; m_DbSet = m_Context.Set <T>(); }
public GenresController(LibraryAppContext context) { _context = context; }
public UserRepositories(LibraryAppContext _ctx) { ctx = _ctx; }
public LoginForm() { context = new LibraryAppContext(); InitializeComponent(); }
public WritersController() { db = new LibraryAppContext(); }
public Repository(LibraryAppContext dbContext) { _dbContext = dbContext; }
/// <summary> /// empty constructor /// creates a new instance of the context /// </summary> public UnitOfWork() { m_Context = new LibraryAppContext(); }
public BooksRepositories(LibraryAppContext _ctx) { ctx = _ctx; }
public BooksController(LibraryAppContext context) { _context = context; }
public BorrowersController(LibraryAppContext context) { _context = context; }
public AuthorsController(LibraryAppContext context) { _context = context; }