Access failed to localdb using EFCore in vs2022

Spellman.Lau 101 Reputation points
2024-06-22T23:16:10.8533333+00:00

Hi,

I created my first Avalonia UI app in MVVM pattern and already installed EFCore 8.0.6 in the project. But failed to access the localdb.

My troubleshoot:

  1. Created a simple console project. No issue. See attached pic1.Image 3
  2. In Avalonia app, checked the localdb instance name, status. Verified EF is installed. Build OK, but connection failed. See attached pic2.Image 4
  3. Microsoft.EntityFrameworkCore., Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools are installed. Could anybody tell me how to fix it? Thanks.
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
753 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Spellman.Lau 101 Reputation points
    2024-06-22T23:28:05.5133333+00:00

    NVM. I am stupid. Server should be "(localdb)\TS9999", not "(localdb)\TS9999"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.