Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

KeyNotFoundException: The given key 'xxxx.DataModel.Models.AspNetUserLogin' was not present in the dictionary.

オープン
#74 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
20/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
api, backend

調査の方向性

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.

Snipaste_2023-08-05_23-57-18

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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

csharpfritz/InstantAPIs のほかの issue

csharpfritz/InstantAPIs の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。