local database error

serhat 20 Saygınlık puanı
2025-10-13T16:15:39.4633333+00:00

Ekran görüntüsü 2025-10-13 183759

I want to develop a form application. I'm creating a local database for it. I want to convert the database to an entity model, but I get this error while converting. I'm creating the local database in the same directory as my project, but it seems to be looking for the database elsewhere. By the way, I'm not having any problems adding tables to the database, I'm just having trouble converting it to a model. I'd appreciate any help. Thanks.

Geliştirici teknolojileri | C#
Geliştirici teknolojileri | C#

Kökleri C dil ailesine dayanan ve bileşen odaklı programlama desteği içeren nesne yönelimli ve tür kullanımı uyumlu bir programlama dili.

0 yorum Açıklama yok

Soru yazarı tarafından kabul edilen yanıt
can kucukgultekin 330 Saygınlık puanı
2025-10-13T19:07:17.1+00:00

this is the usual localdb auto-attach mess. fastest fix: "don’t target the .mdf" in the wizard. just:

  1. open "sql server object explorer" → connect to (localdb)\MSSQLLocalDB
  2. add a new "named db" (e.g. denemesa_db), move/create your tables there
  3. run the edm wizard against (localdb)\MSSQLLocalDB → denemesa_db

that skips |DataDirectory| weirdness. if it still moans, drop any stale db with same name under localdb and re-run. should be like 2 mins tops

Bu yanıt yardımcı oldu mu?

1 kişi bu yanıtı yararlı buldu.
0 yorum Açıklama yok

1 ek yanıt

Sıralama ölçütü: En Yeni
  1. Abdulkadirozbudak6334 0 Saygınlık puanı
    2026-01-28T03:33:47.3533333+00:00

    En yararlı

    Bu yanıt yardımcı oldu mu?

    0 yorum Açıklama yok

Yanıtınız

Yanıtlar, soru sahibi tarafından ‘Kabul Edildi’ ve moderatörler tarafından ‘Önerildi’ olarak işaretlenebilir, bu da kullanıcıların yanıtın yazarın sorununu çözdüğünü bilmelerine yardımcı olur.