简体   繁体   中英

How to login in the database of entity framework context

I'm trying to connect to my context in my VS solution with EF Core

连接

But when I test the connection I get this error

错误

Because it is trying to connect with my domain user instead the user in the connection string

Any idea, please?

Thanks

i cant post pictures in reply so i am using it as answer i will doublecheck lower versions (i guess 5) - since i dont know which version are you using (but image of EF connection is different than mine (!)) 在此处输入图像描述 in linqpad 7 it works在此处输入图像描述

在此处输入图像描述

in addition, if you need a context you can write using regular connection

using(TypedDataContext context = new TypedDataContext(Connection.ConnectionString)){
        
        context.TABLE.Where(w=>w.ID == 64463).Dump();
        
    }

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM