Exemplo n.º 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));
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            var friends = FriendViewModel.ConvertCollectionFromDomain(_friendService.GetAll());

            return(View(friends));
        }