Given this entity model variable:
DataBaseEntities db = new DataBaseEntities ();
The below code can not use from db varibale connection string
SqlBulkCopy sbc = new SqlBulkCopy(db.Connection.ConnectionString);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
try with this approach:
I’ve found this here: Getting SqlConnection from EntityConnection
also see here: EntityConnection.StoreConnection Property
Edit: of course this should be adapted and you should check for nulls or check before casting… it’s just an example 😉