KeyNotFoundException: The given key 'xxxx.DataModel.Models.AspNetUserLogin' was not present in the dictionary.
まだ誰も着手していません。
評価
調査の方向性
Program.cs の抜粋から始め、報告された KeyNotFoundException を症状として使用して、AddInstantAPIs() と MapInstantAPIs() 周辺の失敗を再現します。どの辞書検索が dbContext.DataModel.Models.AspNetUserLogin に関係しているかを追跡し、AddSqlServer() を通じて提供される Entity Framework の構成と比較します。不足しているキーまたは構成の不一致を特定し、確認済みの修正を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Anyone can help find out why im getting this error?
KeyNotFoundException: The given key 'dbContext.DataModel.Models.AspNetUserLogin' was not present in the dictionary.
Here is part of my Program.cs
builder.Services.AddSqlServer<dbContext>(builder.Configuration.GetConnectionString("DefaultConnectionLocal"));
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddApplicationInsightsTelemetry();
builder.Services.AddInstantAPIs();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
// Use CORS
app.UseCors();
app.UseAuthorization();
app.MapControllers();
app.MapInstantAPIs<dbContext>();
app.Run();
- 主要言語
- C#
- スター
- 453
- フォーク
- 58
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
csharpfritz/InstantAPIs のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
csharpfritz/InstantAPIs#75 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
csharpfritz/InstantAPIs#68 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
csharpfritz/InstantAPIs#65 · コメント 8 件 ·
-
Validation layer オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
csharpfritz/InstantAPIs#61 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
csharpfritz/InstantAPIs#60 · コメント 3 件 ·
csharpfritz/InstantAPIs の issue をすべて見る
似ている issue
-
core dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
bug frontend good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Down / Waiting for removal
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100