public HtmlDocument get_instrumentation(HomeInputModel inputModel) { _document.Title = "Instrumentation Samples"; _document.Add("h1").Text("Hello!"); _document.Add("a").Attr("href", "/_fubu#instrumentation").Text("Go to instrumentation"); _document.Push("ul"); _document.Add("li/a") .Text("Make a really long request") .Attr("href", _urls.UrlFor <InstrumentationEndpoint>(x => x.get_really_long_request())); _document.Add("li/a") .Text("Throw an exception") .Attr("href", _urls.UrlFor <ErrorEndpoint>(x => x.get_exception())); _document.Add("li/a") .Text("Make a request with a custom behavior") .Attr("href", _urls.UrlFor(new OtherInputModel { HelloText = "Nothing" })); _document.Add("li/a") .Text("Make a request that occasionally throws an error") .Attr("href", _urls.UrlFor(new OccasionalInput { HelloText = "Hello" })); return(_document); }
public HtmlDocument get_instrumentation(HomeInputModel inputModel) { _document.Title = "Instrumentation Samples"; _document.Add("h1").Text("Hello!"); _document.Add("a").Attr("href", "/_fubu#instrumentation").Text("Go to instrumentation"); _document.Push("ul"); _document.Add("li/a") .Text("Make a really long request") .Attr("href", _urls.UrlFor<InstrumentationEndpoint>(x => x.get_really_long_request())); _document.Add("li/a") .Text("Throw an exception") .Attr("href", _urls.UrlFor<ErrorEndpoint>(x => x.get_exception())); _document.Add("li/a") .Text("Make a request with a custom behavior") .Attr("href", _urls.UrlFor(new OtherInputModel{HelloText = "Nothing"})); _document.Add("li/a") .Text("Make a request that occasionally throws an error") .Attr("href", _urls.UrlFor(new OccasionalInput{HelloText = "Hello"})); return _document; }
public HomeViewModel Home(HomeInputModel model) { return new HomeViewModel { Text = "Hello, world." }; }
public HomeViewModel Get(HomeInputModel input) { //var tasks = _session.Query<CreateTodoInputModel>(); return new HomeViewModel() { Message = "Person!" }; }
public HomeViewModel Get(HomeInputModel model) { return(new HomeViewModel { ID = model.ID, Name = "Andy", Age = 27 }); }
public HomeViewModel Post(HomeInputModel model) { return(new HomeViewModel { ID = model.ID, Name = "Ali", Age = 32, }); }
public HomeViewModel Get(HomeInputModel input) { var languages = _service.GetAll() .Select(x => new LanguageHomeModel { Name = x.Id, Title = "{0} - {1}".ToFormat(x.NeutralName, x.NativeName), TargetModel = new ByLangInputModel {Id = x.Id}, }); return new HomeViewModel { Languages = languages }; }
public ActionResult Edit(HomeInputModel model, int id) { if (ModelState.IsValid) { _models.Remove(_models.Get(id)); model.Id = id; _models.Add(model); Success("The model was updated!"); return(RedirectToAction("index")); } return(View("Create", model)); }
public ActionResult Create(HomeInputModel model) { if (ModelState.IsValid) { model.Id = _models.Count == 0 ? 1 : _models.Select(x => x.Id).Max() + 1; _models.Add(model); Success("保存成功!"); return(RedirectToAction("Index")); } Error("表单中存在一些错误."); return(View(model)); }
public ActionResult Create(HomeInputModel model) { if (ModelState.IsValid) { model.Id = _models.Count == 0?1:_models.Select(x => x.Id).Max() + 1; _models.Add(model); Success("Your information was saved!"); return(RedirectToAction("Index")); } Error("there were some errors in your form."); return(View(model)); }
public ActionResult Create(HomeInputModel model) { if (ModelState.IsValid) { model.Id = Items.Count == 0 ? 1 : Items.Select(x => x.Id).Max() + 1; Items.Add(model); Success("Your information was saved!"); return RedirectToAction("Index"); } LoadCountriesIntoViewData(); Error("there were some errors in your form."); return View(model); }
public async Task <IActionResult> Index(HomeInputModel model) { if (this.ModelState.IsValid) { var pin = model.PIN; var student = await this.studentService.GetStudentToDisplayAsync(pin); if (student == null) { return(this.RedirectToAction("Index")); } student.School = await this.schoolService.GetSchoolAsync(); var viewModel = student.To <DisplayStudentViewModel>(); this.ViewBag.Index = 1; return(this.View("DisplayStudent", viewModel)); } return(this.View(model)); }
public HomeViewModel Get(HomeInputModel input) { return(new HomeViewModel { Message = "Dave" }); }
public HomeViewModel Index(HomeInputModel inputModel) { return new HomeViewModel(); }
public HomeViewModel Execute(HomeInputModel inputModel) { return new HomeViewModel(); }
public ActionResult Edit(HomeInputModel model, int id) { if (ModelState.IsValid) { Items.Remove(Items.Get(id)); model.Id = id; Items.Add(model); Success("The model was updated!"); return RedirectToAction("index"); } return View("Create", model); }
public HomeViewModel Get(HomeInputModel input) { return new HomeViewModel(); }
public HomeViewModel get_home(HomeInputModel input) { return new HomeViewModel(); }
public IActionResult Index(HomeInputModel input) { return(this.RedirectToAction("Listing", "Place", new { searchWord = input.SearchWord, city = input.City })); }
public HomeViewModel Execute(HomeInputModel inputModel) { return(new HomeViewModel()); }
public HomeViewModel Get(HomeInputModel input) { return(new HomeViewModel()); }
public HomeOutputModel Home(HomeInputModel inputModel) { return new HomeOutputModel(); }