I created Asp.Net Core 3.0 web Api project with Identity model (Identity.EntityFrameworkCore Version=3.1.3.0), Now I can Login and Register using api controller, But I have another project created by Asp.Net MVC 5 (Database First) which connecting on the same database, I need in MVC Project adding users in AspNetUsers table directly in the shared database without using Web Api project.
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult AddUser(UserViewModel newUser)
{
if (ModelState.IsValid)
{
// How to add user manually here
_dbContext.AspNetUsers.Add(newUser);
_dbContext.SaveChanges();
}
return View();
}