Пример #1
0
 public IActionResult OnPostOk()
 {
     if (ModelState.IsValid)
     {
         Tour.Id           = ObjectId.GenerateNewId().ToString();
         Tour.Country      = Converter.GetCountry();
         Tour.City         = Converter.GetCity();
         Tour.Accomodation = Converter.GetAccomodation();
         Tour.AgenciesId   = Converter.GetAgency();
         Tour.ExcursionsId = Converter.GetExcursion();
         _agencyList.SynchronizeAdding(Tour);
         _excursionList.SynchronizeAdding(Tour);
         _tourList.Add(Tour);
         return(RedirectToPage("Tours", new { userId = UserId }));
     }
     return(Page());
 }