The demo project
For the purposes of this post I have created a Foo class (and a view model with an associated message):
public class Foo {
public string Name { get; set; }
public DateTime Date { get; set; } }
public class FooEditModel {
public string Message { get; set; }
public Foo Foo { get; set; }
}
I’ve created the following minimal Edit action (omitting any save logic since we’re not interested in that aspect - it just displays a “saved” message):