public IActionResult Delete(int Id)
        {
            var costum = _costumerRepository.GetById(Id);

            _costumerRepository.Delete(costum);



            return(RedirectToAction("List"));
        }
Exemple #2
0
        public IActionResult LendBook(LendViewModel lendViewModel)
        {
            var book      = _bookRepository.GetById(lendViewModel.book.BookId);
            var costumers = _costumerRepository.GetById(lendViewModel.book.borrowerId);

            book.borrower = costumers;
            _bookRepository.Update(book);
            return(RedirectToAction("List"));
        }
 public CostumerModel GetById(string id)
 {
     return(repository.GetById(id));
 }