CRL Rapid Development Framework Series Tutorial IV (delete data)

Source: Internet
Author: User
Tags mongodb support

Catalog of this series
    1. CRL Rapid Development Framework Series tutorial One (Code First Data Sheet no need to care)
    2. CRL Rapid Development Framework Series Tutorial II (based on lambda expression query)
    3. CRL Rapid Development Framework Series Tutorial III (update data)
    4. CRL Rapid Development Framework Series Tutorial IV (delete data)
    5. CRL Rapid Development Framework Series tutorial five (using cache)
    6. CRL Rapid Development Framework Series Tutorial VI (Distributed cache solution)
    7. CRL Rapid Development Framework Series Tutorial VII (using transactions)
    8. CRL Rapid Development Framework Series tutorial eight (using Crl.package)
    9. CRL Rapid Development Framework Series Tutorial nine (Import/Export data)
    10. CRL Rapid Development Framework Series Tutorial 10 (Export object structure)
    11. CRL Rapid Development Framework Series Tutorial 11 (Big Data sub-database sub-table solutions)
    12. CRL Rapid Development Framework Series Tutorial 12 (MongoDB support)

Body

As with updates, there are several ways to delete

Specify conditional deletions by expression

Code.ProductDataManage.Instance.Delete (b = b.id = = 0)

Delete by primary key

The primary key value of the incoming phase type, or the object

By object actually also by primary key Delete

Code.ProductDataManage.Instance.Delete (1); Code.ProductDataManage.Instance.Delete (New Productdata () {Id = 1});

Associate Delete

Delete by SQL Association

var query = Code.ProductDataManage.Instance.GetLambdaQuery ();            Query. Where (b = b.id = = ten);            Query. Join<code.member> ((a, b) = = A.supplierid = = "Ten" && b.name = = "123");            Code.ProductDataManage.Instance.Delete (query);

  

CRL Rapid Development Framework Series Tutorial IV (delete data)

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.