Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

ASP.Net MVC 5 Online Quiz Test

Topics Covered

  • Authentication Filter
  • Search and Sort
  • Scaffolding
  • Creating new string
  • Validations
  • Lazy Loading
  • Serialization
  • Query that returns entities
  • Metadata classes

Useful for hiring

  • .Net MVC Developer
  • ASP.Net MVC Designer
  • MVC Programmer
  • MVC Expert

Start hiring job-fit candidates using this assessment

GET A DEMO

"Finding quality talent is a challenge more so when you consider the sheer number of resumes we get each year. To top this, the time we spent on our recruitment process was humongous. Interview Mocha helped us to cut down on our candidate filtration time by 40%, making it our preferred assessment tool."

Pedro Furtado, Altran,
Capacity Manager
Question

How to include scripts in MVC application?

Answer
    • section Scripts
      {
           @Scripts.Use("~/bundles/jqueryajax")
           @Scripts.Use("~/bundles/jqueryval")
      }
       

    • @section Scripts
      {
           @Scripts.Render("~/bundles/jqueryajax")
           @Scripts.Render("~/bundles/jqueryval")
      }
       

    • @section Scripts
      {
           Scripts.Include("~/bundles/jqueryajax")
           Scripts.Include("~/bundles/jqueryval")
      }
       

    • None of the mentioned
       

Question

I need to set routes in Movie controller when searching for movies. Which code sample should I use?

Answer
    • public class MoviesController : ApiController
      {
          [Route:movies)]
          public IEnumerable<Movie> Get() { }
          [Route:actors/{actorId}/movies]
          public IEnumerable<Movie> GetByActor(int actorId) { }
          [Route:directors/{directorId}/movies]
          public IEnumerable<Movie> GetByDirector(int directorId) { }
      }
       

    • public class MoviesController : ApiController
      {
          [Route("movies")]
          public IEnumerable<Movie> Get() { }
          [Route("actors/{actorId}/movies")]
          public IEnumerable<Movie> GetByActor(int actorId) { }
          [Route("directors/{directorId}/movies")]
          public IEnumerable<Movie> GetByDirector(int directorId) { }
      }
       

    • public class MoviesController : ApiController
      {
          [SetRoute("movies")]
          public IEnumerable<Movie> Get() { }
          [SetRoute("actors/{actorId}/movies")]
          public IEnumerable<Movie> GetByActor(int actorId) { }
          [SetRoute("directors/{directorId}/movies")]
          public IEnumerable<Movie> GetByDirector(int directorId) { }
      }
       

    • None of the mentioned
       

Question

To enable attribute based routing, which code snippet should be used?

Answer
    • public static void RegisterRoutes(RouteCollection routes)
      {
          routes.Ignore("{resource}.axd/{*pathInfo}");
          routes.MapAttributeRoutes();
          routes.SetRoute(name: "Default",url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });
      }
       

    • public static void RegisterRoutes(Route routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapMvcAttributeRoutes();
          routes.MapRoute(name: "Default",url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });
      }
       

    • public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapMvcAttributeRoutes();
          routes.MapRoute(name: "Default",url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });
      }
       

    • None of the mentioned
       

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO