Hi @Shashi - I've had this issue when I tried to move to .net 6, turns out it just needed the EF nuget package updated to the latest version. Something about .net 6 and the older EF versions wasn't playing nicely.
Not sure if you have the same problem but it's worth a try if you haven't upgraded it yet.
Good luck!
Max