.NET Daily

Recommended Resources

Popular Content

Tagdynamic operation

Common .NET Exceptions

How to solve: An expression tree may not contain a dynamic operation – ASP.NET Core

Posted on July 6th, 2019.

This type of exception usually happens when you forget to declare in the view the model that you plan to use. In the code of the view, you will see the attributes underlined with a red line, as on the picture from below: The solution for this issue is to specify at the top of the page the model you plan to use: @model TestApp.Models.User