我已经配置了原始身份模型以满足我的要求,修改如下:
public class ApplicationUser : IdentityUser
{
public workshop workshop { get; set; }
public int workshopId { get; set; }
,然后输入一些代码:
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public DbSet<workshop> workshop { get; set; }
如何在API控制器中获取当前登录用户的workshopId?