title: How to migrate from MVC to Blazor Server-side?
body: <p>I'm in the process of migrating my app from MVC (not Razorpages) to Blazor. Migrating the markup and the model was pretty straightfoward.</p>
  <p>However, how am I going to migrate the controller actions? For example, I have a controller with 2 actions:</p>
  <pre><code>[HttpGet]
  [AllowAnonymous]
  public IActionResult Register(string returnUrl = null)
  {
      ViewData[&quot;ReturnUrl&quot;] = returnUrl;
      return View();
  }
  
  [HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public async Task&lt;IActionResult&gt; Register(RegisterViewModel model, string returnUrl = null)
  {
      ViewData[&quot;ReturnUrl&quot;] = returnUrl;
  
      if (ModelState.IsValid)
      {
          var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
          var result = await _userManager.CreateAsync(user, model.Password);
          if (result.Succeeded)
          {
              await _signInManager.SignInAsync(user, isPersistent: false);
              return RedirectToLocal(returnUrl);
          }
          AddErrors(result);
      }
  
      return View(model);
  }
  </code></pre>
  <p>How do the above actions get migrated to Blazor?</p>