I have a model similar to this:
public class SampleModel
{
public Product Product { get; set; }
}
And in my controller I get an excep
In this link explain about @model, see a excerpt:
@model(lowercase "m") is a reserved keyword in Razor views to declare the model type at the top of your view. You have put the namespace too, e.g.:@model MyNamespace.Models.MyModelLater in the file, you can reference the attribute you want with
@Model.Attribute(uppercase "M").