I get the following error:
I didn't get it before and HotelRoomRepository and HotelImageRepository are not new repositories.
This is how my StartUp class is looking:

I get the following error:
I didn't get it before and HotelRoomRepository and HotelImageRepository are not new repositories.
This is how my StartUp class is looking:

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ajander Singh28 reputationPosted Aug 15, 2022, 2:57 AM EDT
try to register ApplicationDbContext as Scoped like below:
services.AddDbContext(ServiceLifetime.Scoped);
Rositsa RusevaRank #5,080 · 312 reputationPosted Aug 17, 2022, 12:06 AM EDT
Rositsa RusevaRank #5,080 · 312 reputationPosted Aug 17, 2022, 12:06 AM EDT