MVC Learning Notes

Source: Internet
Author: User
Tags ruby on rails

IIS out of question: Two command cmd inside the Aspnet_regiis-i vs command also executes under

HttpModule is a filter for HttpApplication.

EF ORM Framework: EF

Access at the bottom: the ADO Data Model

Ldcdbentities db =Newldcdbentities (); //Enquiryiqueryable<ldc_goods_brand> temp = fromUinchdb. Ldc_goods_brandwhereU.id >0                                               Selectu; foreach(varIteminchtemp) {Console.WriteLine (item.            brandname); }            //Modify//entities that are queried through LINQ expressions or LAMDBA, by default, are monitored by the EF for you            varGoodsbrand =temp.            FirstOrDefault (); if(Goodsbrand! =NULL) {Console.WriteLine (goodsbrand.brandname); //the internal will automatically tell the context I signed the entity changed state also changed to modified stateGoodsbrand.brandname =DateTime.Now.ToString (); //give the context a command; Save all the body changes back to the database.db.            SaveChanges (); }            //Delete sweep do            if(Goodsbrand! =NULL)            {                //db. Ldc_goods_brand. The delete operation did not succeed!!!!!!             }            //AddLdc_goods_brand Brand =NewLdc_goods_brand (); Brand. Brandname="newly Added!! "; Brand. Createtime=DateTime.Now; Db. Ldc_goods_brand.add (Brand);//Add different methodsdb.            SaveChanges (); Console.readkey ();
EF Exercises

MVVM, MVP is a variant of MVC.

DTO data can serialize transport on a data network

Enterprise Service Bus (business layer)

ORM Persistence mode

Querying some columns

// querying some columns             // var demo1 = from u in db. Ldc_goods_brand            //            Select new {u.id, u.brandname};            var 2 New {oo. Id, Oo. Brandname});             foreach (var in Demo2)
LINQ Lambda

Lambda-expression Paging query

  //Paging Query            varDemo4 = db. Ldc_goods_brand.where<ldc_goods_brand> (UU = uu. Id >0)                //. Orderby<ldc_goods_brand, int> (UU = uu. ID);//Ascending. OrderByDescending (UU = uu. ID)//in descending order. Skip<ldc_goods_brand> (2)//How many lines are crossed?. Take<ldc_goods_brand> (2);//How many bars are taken?//command-type programming functional Programming            #endregion
//Paging query

Developing a website faster: Ruby on rails, imperative programming

IQueryable implements the Ienumable interface

MVC Learning Notes

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.