Varolan bir veritabanına dayalı bir Varlık Çerçevesi modeli oluşturdum, ardından modelden POCO objeleri oluşturdum. Web.config'imdeki bağlantı dizesi Entity Framework değil, sadece standart bağlantı dizesidir (CSDL, SSDL, MSL referansları eksik).Kod İlk ve Veri Tabanı İlk
Başvurumu derlemek, ama ben çalıştırdığınızda bu hatayı alıyorum:
Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception
Sorum şu, nereye Poços oto kuşaktan geldi ve nasıl olabilir fark etmez benim kodunda Kod İlkesi gibi davranmamı sağlıyorum? Bağlantı dizgimde CSDL'ye başvurmak istemiyorum.
, her ikisi de önce modeli ve kodu kullanmanız çok kötü ... – Serdar
@Serdar - Mutlaka değil. Bilinen bir modelden kod üretmeye başlamak isteyebilir, ancak bu noktadan sonra, ilk önce kod kullanarak yeni kod yazmayı başlatın. –
Sadece anladım :) üzgünüm ... – Serdar