Entity Framework : Set MySQL custom environment variables
问题 I have an issue with Entity Framework 5.0. I'm working with Silverlight 5 and MySQL 5.6 too. I need to set an environment MySQL variable before each connexion to the MySQL server. E.g SET @my_var = 'test'; Under Mysql I don't have any issues. The following raises an EntityFrameworkException (syntax error near '@'). this.ObjectContext.CreateQuery<object>(" SET @my_var = 'test' "); OR this.ObjectContext.CreateQuery<object>(" CALL set_my_var('test') "); This last method raises a MySQLException