title: BadRequestObjectResult(Errors.AddErrorsToModelState(result, ModelState)) is not working
body: <p>I am using a code from "<a href="https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login" rel="nofollow noreferrer">https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login</a>" but I can't get past the AccountsController since I get this error: "The name 'Errors' does not exist in the current context"</p>
  
  <p>This is my code:</p>
  
  <pre><code>using System.Threading.Tasks;
  using AutoMapper;
  using Microsoft.AspNetCore.Identity;
  using Microsoft.AspNetCore.Mvc;
  using webapi.DataContext;
  using webapi.Models;
  using webapi.ViewModels;
  
  namespace webapi.Controllers
  {
      [Route("api/controller")]
      [ApiController]
      public class AccountsController : ControllerBase
      {
          private readonly UserManager&lt;AppUser&gt; _userManager;
          private readonly IMapper _maper;
          private readonly ApplicationDbContext _appDbContext;
          public AccountsController(UserManager&lt;AppUser&gt; userManager, IMapper maper, ApplicationDbContext appDbContext)
          {
              _appDbContext = appDbContext;
              _maper = maper;
              _userManager = userManager;
  
          }
  
          [HttpPost]
          public async Task&lt;IActionResult&gt; Post(RegistrationViewModel model) 
          {
              if(!ModelState.IsValid){
                  return BadRequest(ModelState);
              }
  
              var userIdentity = _maper.Map&lt;AppUser&gt;(model);
  
              var result = await _userManager.CreateAsync(userIdentity, model.Password);
  
              if (!result.Succeeded) return new BadRequestObjectResult(Errors.AddErrorsToModelState(result, ModelState));
  
              await _appDbContext.Customers.AddAsync(new Customer { IdentityId = userIdentity.Id, Location = model.Location });
              await _appDbContext.SaveChangesAsync();
  
              return new OkObjectResult("Account created");
          }
      }
  }
  </code></pre>
  
  <p>I get the error on this line: </p>
  
  <blockquote>
    <p>if (!result.Succeeded) return new BadRequestObjectResult(Errors.AddErrorsToModelState(result, ModelState));</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/DAzFH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DAzFH.png" alt="enter image description here"></a></p>
  
  <p>Can you please show me how to this right? Than you.</p>