admin管理员组文章数量:1026062
I am currently using .Net Framework Identity
And been following a video tutorial.
namespace SwmmDashboard
{
public class AppDbContext : IdentityDbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) {
}
public DbSet<Device> Devices { get; set; }
public DbSet<Parameter> Parameters { get; set; }
public DbSet<DataCollection> DataCollections { get; set; }
public DbSet<User> Users { get; set; }
}
}
I have this code where I added IdentityDbContext which is located in a different project but in the same solution. it migrated smoothly and the database updated.
but now in a different project for UI called SwmmUI,
public Task<IActionResult> OnPostExportAsync()
{
return _impAndExp.Export(_context);
}
The _context is in red stating that Screenshot of the error
I tried reinstalling the nuget but the error is still there
I am currently using .Net Framework Identity
And been following a video tutorial.
namespace SwmmDashboard
{
public class AppDbContext : IdentityDbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) {
}
public DbSet<Device> Devices { get; set; }
public DbSet<Parameter> Parameters { get; set; }
public DbSet<DataCollection> DataCollections { get; set; }
public DbSet<User> Users { get; set; }
}
}
I have this code where I added IdentityDbContext which is located in a different project but in the same solution. it migrated smoothly and the database updated.
but now in a different project for UI called SwmmUI,
public Task<IActionResult> OnPostExportAsync()
{
return _impAndExp.Export(_context);
}
The _context is in red stating that Screenshot of the error
I tried reinstalling the nuget but the error is still there
Share Improve this question asked Nov 17, 2024 at 13:44 AdiAdi 173 bronze badges1 Answer
Reset to default 0What I did was just to delete the duplicated AppDbContext from the other project and consolidated it to one context in the backend project of the solution, so basically, mixing both contexts
I am currently using .Net Framework Identity
And been following a video tutorial.
namespace SwmmDashboard
{
public class AppDbContext : IdentityDbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) {
}
public DbSet<Device> Devices { get; set; }
public DbSet<Parameter> Parameters { get; set; }
public DbSet<DataCollection> DataCollections { get; set; }
public DbSet<User> Users { get; set; }
}
}
I have this code where I added IdentityDbContext which is located in a different project but in the same solution. it migrated smoothly and the database updated.
but now in a different project for UI called SwmmUI,
public Task<IActionResult> OnPostExportAsync()
{
return _impAndExp.Export(_context);
}
The _context is in red stating that Screenshot of the error
I tried reinstalling the nuget but the error is still there
I am currently using .Net Framework Identity
And been following a video tutorial.
namespace SwmmDashboard
{
public class AppDbContext : IdentityDbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) {
}
public DbSet<Device> Devices { get; set; }
public DbSet<Parameter> Parameters { get; set; }
public DbSet<DataCollection> DataCollections { get; set; }
public DbSet<User> Users { get; set; }
}
}
I have this code where I added IdentityDbContext which is located in a different project but in the same solution. it migrated smoothly and the database updated.
but now in a different project for UI called SwmmUI,
public Task<IActionResult> OnPostExportAsync()
{
return _impAndExp.Export(_context);
}
The _context is in red stating that Screenshot of the error
I tried reinstalling the nuget but the error is still there
Share Improve this question asked Nov 17, 2024 at 13:44 AdiAdi 173 bronze badges1 Answer
Reset to default 0What I did was just to delete the duplicated AppDbContext from the other project and consolidated it to one context in the backend project of the solution, so basically, mixing both contexts
本文标签: cArgument type is not assignable to parameter type problem in IdentityDbContextStack Overflow
版权声明:本文标题:c# - Argument type is not assignable to parameter type problem in IdentityDbContext - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745632582a2160251.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论