public ActionResult PageB(string code) { if (String.IsNullOrEmpty(code)) { return(View("Error")); } var message = _messageService.GetByCode(code); PageBViewModel model; if (message != null) { model = Mapper.Map <Message, PageBViewModel>(message); } else { model = new PageBViewModel { Code = code }; } return(View(model)); }
public PageB() { InitializeComponent(); BindingContext = new PageBViewModel(this); }