title: Get an Object of UserManager Class in Asp.net Core?
body: <pre><code>using System;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Security.Claims;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Identity;
  using Services_Website.Models;
  using Microsoft.AspNetCore.Mvc;
  using Services_Website.Data;
  using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
  
  namespace Services_Website.CustomFunctions
  {
      public class CustomUserOperations: Controller
      {
  
          private UserManager&lt;ApplicationUser&gt; _userManager;
          public ApplicationUser GetCurrentUser()
          {
              ClaimsPrincipal currentUser = User;
              _userManager = new UserManager&lt;ApplicationUser&gt;();
              var user =_userManager.GetUserAsync(User).Result;
              return user;
          }
      }
  }
  
  </code></pre>
  
  <p><strong>* This is my Controller *</strong> </p>
  
  <p>I Just want to get an object of the UserManager Class But when I do it I am getting this ERROR</p>
  
  <blockquote>
    <p>Error CS7036  There is no argument given that corresponds to the required formal parameter 'store' of 'UserManager.UserManager(IUserStore, IOptions, IPasswordHasher, IEnumerable>, IEnumerable>, ILookupNormalizer, IdentityErrorDescriber, IServiceProvider, ILogger>)'    Services_Website    F:\webApplication\CoreApp\Services_Website\Services_Website\CustomFunctions\CustomUserOperations.cs 75      Active *</p>
  </blockquote>
  
  <p>*What is the Error source</p>