public ActionResult Register(RegisterView model)
        {
            if (ModelState.IsValid)
            {
                model = _membershipService.Register(model);
                if (model.Success)
                {
                    _formsService.SignIn(model.ApiKey, true);
                    return RedirectToAction("Index", "Search");
                }
                else
                {
                    ModelState.AddModelError("", model.ResponseMessage);
                }
            }

            return View(model);
        }
 public RegisterView Register(RegisterView view)
 {
     RegisterRequest request = (RegisterRequest)GetMappedObject(view, typeof(RegisterRequest));
     return (RegisterView)GetMappedObject(_membershipService.Register(request), typeof(RegisterView));
 }