Beispiel #1
0
        public IActionResult Create()
        {
            var newLoan = new LoanViewModel
            {
                Friends    = FriendViewModel.ConvertCollectionFromDomain(_friendService.GetAll()),
                Games      = GameViewModel.ConvertCollectionFromDomain(_gameService.GetAvailableGames()),
                LendDate   = DateTime.Now,
                ReturnDate = DateTime.Now.AddDays(1)
            };

            return(View(newLoan));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            var friends = FriendViewModel.ConvertCollectionFromDomain(_friendService.GetAll());

            return(View(friends));
        }