I have a question regarding Binding of attributes in a Controller's Action.
My model has 3 attributes: Name, UserName and Email:
public class User {
public string Name {get;set;}
public string UserName {get;set;}
public string Email {get;set;}
}
If I want my Create Action to have a new attribute, such as a "Login" Boolean, is there a way to Bind a new attribute to my model, like:
public ActionResult Create([Bind(Include = "Name, UserName, Email, Login")] User model)
Or do I must create a ViewModel to do so?