It seems that all the recommended approaches I see on the internet are to use the UserManager<TUser>.CreateAsync()
method to create users.
What are the downside of using only ef core dbContext?
Say that I have a TimeZoneInfoId
column in AspNetUsers.
public class ApplicationUser : IdentityUser
{
public string? TimeZoneInfoId { get; set; }
}
Is it bad to update it using dbContext?
For instance:
using var dbContext = await DbContextFactory.CreateDbContextAsync();
var userToUpdate = await dbContext.ApplicationUsers.Where(u => u.UserName == "John").FirstOrDefaultAsync();
userToUpdate?.TimeZoneInfoId = "Samoa Standard Time";
await dbContext.SaveChangesAsync();
Or is it perfectly fine to do so?