简介: 【应用服务 App Service】当使用EntityFrameWorkCore访问Sql Server数据库时,在Azure App Service会出现Cannot create a DbSet for ** because this type is not included in the model for the context的错误 问题情形 使用EF Core访问数据库,在本地运行正常,发布到App Service后,偶尔出现了Cannot create ...
Cannot create a DbSet for 'IIncludableQueryable<OrderItemEntity, ProductPriceEntity>' because this type is not included in the model for the context. System.InvalidOperationException: Cannot create a DbSet for 'IIncludableQueryable<OrderItemEntity, ProductPriceEntity>' because this type is not in...
An unhandled exception occurred while processing the request. InvalidOperationException: Cannot create a DbSet for 'IdentityUserClaim<string>' because this type is not included in the model for the context. Microsoft.EntityFrameworkCore.Internal.InternalDbSet<TEntity>.get_EntityType() 解决方法,Context...
2.1.0-rc1-finalversion throwsCannot create a DbSet for 'IdentityUserClaim<string>' because this type is not included in the model for the contextexeption onSignInManager<TUser>.PasswordSignInAsync: Microsoft.EntityFrameworkCore.Internal.InternalDbSet<TEntity>.get_EntityType() Microsoft.EntityFramew...
问题情形 使用EF Core访问数据库,在本地运行正常,发布到App Service后,偶尔出现了Cannot create a DbSet for ** because this type is not included in the model for the context,根据错误,初步怀疑
From the error message, it may be related to your configuration of Identity. Could you share your startup.cs and DbContext to us?Here is a suggestion I have found which you could refer to.And below is a simple demo if you use an ApplicaionUser instead of IdentityUser:...
Cannot create a DbSet for 'ApplicationUser' because this type is not included in the model for the context Microsoft Learn Challenge Nov 23, 2024 – Jan 10, 2025 立即報名 關閉警示 Learn 登入 我們不會再定期更新此內容。 如需此產品、服務、技術或 API 的支援資訊,請參閱Microsoft 產品生命週...
Cannot create a DbSet for 'ApplicationUser' because this type is not included in the model for the context Closed - Lower Priority01 0Votes BNBryan Nilsen -Reported Jun 23, 2017 2:04 AM I reverse-engineered my database with the scaffold command in the NuGet Package...
{ public DbSet<Image> Images { get; set; } } public class Image { public int Id { get; set; } [Required] public byte[] Data { get; set; } } class Program { static void Main() { using (var context = new Context()) { // Throws context.Database.Initialize(force: false); }...
Already defines a member ... with the same parameter types an attribute argument must be a constant expression An error occurred when trying to create a controller of type 'XXXController'. Make sure that the controller has a parameterless public construc...