0

I try to create a crud controller with asp.net mvc using Mysql database, the database is secure (I can only display tables).

When I try to generate the controller this error appears:

Error Picture Here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Aymen Rahal
  • 53
  • 1
  • 7

1 Answers1

0

I would suggest you to try the following:

  • Make sure you have the latest updates for your Visual Studio
  • Upgrade to Entity Framework 6 (If you can)
  • Modify the context configuration to use IDbSet<...> instead of DbSet<...>

Alternatively, you can also give the below commands a try in the Package Manager Console.

Uninstall-Package EntityFramework -Force

Install-Package EntityFramework

Uninstall-Package MvcScaffolding

Install-Package MvcScaffolding

Follow this link for more suggestions.

Community
  • 1
  • 1
monstertjie_za
  • 7,277
  • 8
  • 42
  • 73
  • Assembly 'Microsoft.AspNet.Identity.EntityFramework' with identity 'Microsoft.AspNet.Identity.EntityFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' which has a higher version than referenced assembly 'EntityFramework' with identity 'EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' NewProject – Aymen Rahal Jul 11 '16 at 06:57
  • An expression tree may not contain a dynamic operation NewProject – Aymen Rahal Jul 11 '16 at 06:58
  • An expression tree may not contain a dynamic operation NewProject. This error is not at all related to the issue you posted in your original question. Here is a link to help you with the above mentioned issues. Someitmes, I little bit of "Google" can help you a lot, instead of just pasting your problems here on Stackoverflow. Check out this link to help you with above error: http://stackoverflow.com/questions/4155392/razor-view-engine-an-expression-tree-may-not-contain-a-dynamic-operation – monstertjie_za Jul 11 '16 at 07:23
  • my app was good before using your answer. now i have more than 6 error, thanks for make it worst. – Aymen Rahal Jul 11 '16 at 08:37