Home / CSE MCQs / MVC MCQs :: Discussion

Discussion :: MVC MCQs

  1. How to check all errors of Model using ASP.Net MVC?
  2. A.
    var errors = Model.Values.SelectMany(v => v.Errors)
    B.
    var errors = ModelState.SelectMany(v => v.Errors)
    C.
    var errors = ModelState.Values.SelectMany(v => v.Errors)
    D.
    None

    View Answer

    Workspace

    Answer : Option C

    Explanation :



Be The First To Comment