Data access component requirements

Source: Internet
Author: User

In the past two days, I thought about writing the Data Access Components that I needed first. I also read some ORM related to ORM AND THE ORM in MS Framework 3.5, however, I think it is better to write my own ideas.
If you need to write your own code, you must first know what kind of result you want at last, so record the simple requirements here:
Insert operation of domainmodel: here, the operation is simply to add the domainmodel to the database, without considering the automatic generation of primarykey. My idea is to automatically generate one here: Code It is not easy to implement. For example, if you use WCF, the location where the domainmodel is generated may be on the client side and will be considered for later processing. Program This primarykey is most likely to use guid, so this issue is not considered here.
Delete operation of domainmodel: supports deleting with full matching of pirmakykey and domainmodel and specified conditions.
Update operation of domainmodel: supports updating a single domainmodel by primarykey, running full match update with domainmodel, updating some attributes, and updating domainmodel by condition.
Domainmodel Select Operation: You can obtain a single domainmodel Based on primakykey, all domainmodels, a set of single domainmodel or domainmodel based on conditions, and domainmodel within a specified range.
Multi-to-Multi-relationship processing: supports adding multiple-to-many relationships between two domainmodels, deleting the relationships between two domainmodels, and checking whether there is a domainmodel relationship between the two domainmodels, of course, adding, deleting, and checking all refer to the primaykey between two domainmodels for checking.
Here, by Condition refers to the foreign keys in many-to-many relationships based on the attributes of one or more domainmodels (other ones have not been considered yet ).

There is also a set of non-functional requirements:
Support and convenient access to databases using SQL, and support ing between tables and domainmodel in various forms (Here we mainly want to use the attribute of ORM in. NET Framework 3.5 ). You can obtain the usage of the SQL statement generated by the component and the SQL statement added by the external code. For example, you can use the data access component to generate the statement before the SELECT statement, add the part after where and when writing according to the appropriate situation.
I think this is what we need to support now. We don't need the best components, but we only need the most. If the friend has any good suggestions, please mention the difference here, despite criticism and correction.

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.