コード例 #1
0
        public ActionResult OwnerHome(int memberId)
        {
            List <Aircraft> aircraftList = _dataService.GetManagedAircraftForMember(memberId);

            AircraftOwnerHomeViewModel pageVM = new AircraftOwnerHomeViewModel();

            pageVM.MemberId = memberId;

            foreach (var ac in aircraftList)
            {
                AircraftListItemViewModel acVM = new AircraftListItemViewModel()
                {
                    Id                 = ac.Id,
                    ImageUrl           = "",
                    Make               = ac.Make,
                    Model              = ac.Model,
                    RegistrationNumber = ac.RegistrationNumber
                };

                pageVM.Aircraft.Add(acVM);
            }

            return(View("OwnerHome", pageVM));
        }