MVC series Learning (III)-delayed loading of EF, mvc-ef
1. What is delayed loading?
Literally, an action that is supposed to be executed immediately is not executed immediately.
2. Understand the code
Static void Main (string [] args) {// when executing this statement, check the SQL Monitor and find that the SQL statement IEnumerable
An SQL
Learning ASP. net mvc Framework secrets note-View and Presenter interaction rules (for SC Mode), mvc-view2. View and Presenter interaction rules (for SC Mode)
The interaction between View and Presenter is the core of the entire MVP. Whether the MVP mode can be correctly applied to construct our application depends on whether the relationship between View and Pre
returned by ActionFilter.OnActionExecuted.InvokeActionMethodWithFilters is ActionExecutedContext, Next, the controller executes the Onresultexecuting method. The result of ActionResult execution can be viewresult,jsonresult,redirectresult,contentresult, or a custom result type.If the returned type is ViewResult, let's take a look at Viewreuslt's inheritance: Viewresult-->viewresultbase-->actionresult, Viewresult contains two attributes view and viewenginecollection, which is actually an impleme
}/{action}/{id} ',//URL with parameterNew {controller = "Home", action = "Index", id = urlparameter.optional}//parameter default value);}This static method is used to rewrite the path, you can see the routes. MapRoute ("Default",//route name' {controller}/{action}/{id} ',//URL with parameter, this is the format of the URL that will be rewritten in the futureExplain an Index method under the Home controller in our Url:http://localhost:2906/home/index, not the file path we normally see.All right,
MVC Learning Series-Model verification extension, mvc series model verification
In MVC, front-end backend verification is implemented.
Front-end Verification. Steps:
Web. config must be enabled:
JS settings
Step 1: Introduce page js
@Scripts.Render("~/bundles/jqueryval")
Step 2: BundleConfig class, which must have
Learning ASP. net mvc (7) -- my first ASP. net mvc query page, asp. netmvc
In this article, I will add a new query page (SearchIndex) that can be queried Based on the type or name of the book. The URL of this new page is http: // localhost: 36878/Book/SearchIndex. This page uses a drop-down box to display types. You can enter the name of a book in a text box. Aft
1, [Require] (non-null verification) [Required] publicstringgetset;Effect:2. [DisplayName ("gen--der")] Public string Get set; }Effect:[DisplayAttribute (name = "Learner name")][Display (name = "Learner name")]can achieve the same effect3, date format display (image from the Internet, infringement is deleted)4, [DataType (DATATYPE.XXXXX)] Role: Change the type of display4-1.[datatype (datatype.emailaddress)] role: Display as a mailbox hyperlink [DataType (dat
, then the view becomes active, that is, the model is active, and the data is queried to obtain the data. That is, in, see, view to model is solid line ...3. controller and Model : The controller is always active, the controller is responsible for invoking the various data dictionaries defined in the model, and the model is simply providing data services, or validating the service to the controller.Well, in summary: That is, the user sent over the request, first through the routing, routing mech
SSSLINPPPException handling please refer to the previous blog: "Spring Learning note-mvc-15" Spring MVC exception handling"Http://www.cnblogs.com/ssslinppp/p/4610043.html;How do I jump to the 404 interface when I encounter a 404 error? This is described below. 404.jspdefined in Web. XML
java.lang.Throwable
/500.jsp
500
/500.jsp
MVC series Learning (11)-verification and mvc series Verification
1. Use an instance to understand the powerful verification functions in MVC
1.1 create a [basic] mvc project. Because the verification js is used, write the code in a view and the code in the Model is as foll
The 1.MVC area is a small MVC, and zone routes are higher than normal routes.MVC zone comes with m,v and C, can put products, members, news, documents more time, you can use multiple areas to split the project into small projects2. Render the local view and local action (Ifram way will not be crawled by spiders, not conducive to SEO)@{ //html.renderpartial ("about");//Only render the About pa
Learning about the ASP. net mvc framework-the traditional MVC model, asp. netmvc1.1 traditional MVC Mode
For most end-user applications, they all need a visual UI that interacts with users. We call this UI a View ). In the early days, we tend to combine all operations related to the UI, these operations include the pr
Take notes on learning ASP. net mvc Framework-MVP, mvc-mvp1.2.1 MVP
MVP is a UI architecture that is applicable to event-driven application frameworks. In MVP, M and V correspond to the MVC Model and View respectively, while P (Presenter) replaces Controller.
In MVP mode, only the Presenter can directly interact with
MVC series Learning (14)-routing rules and route debugging tools, mvc debugging tools
1. This learning code is relatively simple, that is, add a route information in the routing configuration file, and add a corresponding controller and view.
There are two routing matching rules, a Kim controller, which has an Index
MVC series Learning (12)-server verification, mvc series server Verification
In the previous article, we mentioned that the client can always be fake, so we have to verify it on the server.
1. The code in the view and Model is as follows:
2. A picture to remember, server-side verification, what has been done for us, and the principle of discovery is one more
MVC series Learning (5)-passing data and receiving data, mvc Series
1. The controller transmits data to the view
A. Use ViewData
B. Use ViewBag
C. Use Model
Method 2:
D. Use TempData
2. Why are some attributes set in the Controller acceptable in the view?
3. Action receives data from the Url
Parameters for receiving client requests by Action
Learning ASP. net mvc frameworks-PV and SC, mvc-pv1. The best solution for PV and SC to solve View's difficulty in testing is to prevent him from testing. If View does not need to be tested, the prerequisite is that it does not involve the UI processing logic as much as possible, which is the purpose of the PV mode.If we use the PV mode to design the View, we nee
Spring MVC learning summary and springmvc learning Summary(1) Spring MVC is an MVC framework. I personally think that Spring MVC annotation-based development is more convenient than Struts2, and can directly replace Struts above (
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.