S
S
Sergey Korolkov2019-02-14 03:30:44
ASP.NET
Sergey Korolkov, 2019-02-14 03:30:44

What is the difference between input model and view model?

There are Domain model, View model and Input model. I'm wondering what is Input model. I'm just confused, what kind of model is this for example?:

public class User{
        public string Name { get; set; }
        public string Age { get; set; }
    }

view:
@model EditFormApplication.Models.User
    
        @using (Html.BeginForm("Index", "Home", FormMethod.Post))
        {
             @Html.TextBoxFor(model => model.Name)
             @Html.TextBoxFor(model => model.Age)
        <input type="submit" value="Save">
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Korolkov, 2019-02-14
@vhelsing90

Found the answer https://stackoverflow.com/questions/54681948/what-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question