Beispiel #1
0
 public IActionResult OnGet(int id)
 {
     Lending = lendingService.GetLendingById(id);
     if (Lending == null)
     {
         return(RedirectToPage("NotFound"));
     }
     Library = libraryService.GetLibraryById(Lending.LibraryId);
     Lending.DatumVratena = DateTime.Now;
     return(Page());
 }
Beispiel #2
0
        public IActionResult ReturnLending(int id)
        {
            var lending = lendingService.GetLendingById(id);

            if (lending == null)
            {
                return(View("NotFound"));
            }
            var library = libraryService.GetLibraryById(lending.LibraryId);

            lending.Library = library;
            return(View(lending));
        }