1
のMySQLのC#との接続Entity Frameworkの、エラー:私は、Visual Studio 2012</p> <p>そしてこのすべてがうまくいっている中でエンティティFramworkでMySQLに接続するために必要なすべてのを設定している
は、私は私のテーブルのマッピングを取得します私のコードでは、ここ
が私のコードです:
0:実行中using (testuserEntities context = new testuserEntities())
{
personels nam = context.personels.FirstOrDefault(x => x.name == "Walid");
if (nam !=null)
{
textBox1.Text = nam.name;
}
}
、私はエラーを取得します
Thnaks、
接続文字列:
<connectionStrings>
<add name="testuserEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=root;persistsecurityinfo=True;database=testuser"" providerName="System.Data.EntityClient"/>
私のテーブル:
あなたはあなたの '接続文字列'と 'context'クラスを共有できますか? – Sampath
http://stackoverflow.com/a/19898907/6356434 – Alex
また、 'models'の' code'ですか? – Sampath