Fluentdata lightweight. NET orm Persistence Technology (C#4.5/LINQ/LAMBDA, transaction/storage process, open source framework)

Source: Internet
Author: User

    • Course lecturer: Wind dancing Smoke

    • Course Categories:. NET Framework

    • Suitable for people: Beginner

    • Number of lessons: 19 hours

    • Update level: Complete

    • Type of Service: Class C (General Service class course)

    • Technology used: Fluentdata

    • Projects involved: Fluentdata lightweight


Need more information to contact Q2748165793

Course Introduction

3.1 About ORM

One, what is ORM

ORM, the Object-relationalmapping (object-relational mapping), is a mapping between a relational database and a business entity object, so that we do not need to deal with complex SQL statements when it comes to manipulating business objects. Simply manipulate the properties and methods of the object.

Second, the advantage of using ORM

Advantage one, hide the data access details, "closed" Universal database interaction, ORM Core. He makes our universal database interaction simple and easy, without having to think about the damned SQL statements at all. Rapid development, resulting from this.

Advantage Two, ORM makes it easy for us to construct solidified data structure

In the Prehistory of the ORM chronology, we need to transform our object model into a single SQL statement that constructs our database system in a relational database by direct connection or dbhelper. Now, basically all ORM frameworks provide the ability to construct relational database structures through the object model. That's pretty good.

Iii. Disadvantages of using ORM

First: Inevitably, automation means mapping and associated management, at the expense of performance (early, this is what all dislike orm people have in common). Now the various ORM frameworks are trying to use various methods to alleviate this block (Lazyload,cache), the effect is still very significant.

Second: Object-oriented Query Language (X-QL) as a transition between database and object, although the business abstraction of data plane is hidden, it can't completely block the design of database layer, and will undoubtedly increase the learning cost.

Third: For complex queries, ORM is still powerless. Although it can be achieved, but not worth it. The view can resolve most calculated column,case,group,having,order by, exists, but the query condition (A and B and not C and (d ord)) ...

No donkey in the world does not eat grass (and think well and think skillfully, buy an old donkey does not eat grass), any advantage behind all hidden shortcomings, it is inevitable. The question is whether we can tolerate shortcomings


3.2. Comparison of several common ORM frameworks

Comparison of several common frames

The above is the more common on the market. Netorm Frame. In fact, the more perfect ORM framework should be satisfied:

1. Object-to-database mapping

2. Object Caching

3. Visual design and code generation tools

4. Support Multi-database

5. Dynamic Query

6. Lazy Loading

7. Non-intrusive persistence

8. Excellent performance

9. Support for stored procedures and transactions

10. Multi-object-oriented framework support

The ORM framework is really handy, but there are also shortcomings, such as multi-table federated queries, which are not ideal for view and stored procedures. Overall performance is lower than for SQL statements.

The above frameworks are more commonly used nhibernate, Microsoft's EF and Mybatis.net and fluentdata.

Each of these frameworks has advantages and disadvantages

such as: NHibernate, the famous hibernate manufacturers produced specifically for. NET ORM Framework, the advantages are: powerful, complete data, the disadvantage is complex configuration, high learning costs

Microsoft's EF is naturally the most important in the VS development, the advantage is the integration with Vside good, the disadvantage is that performance is lower than Nhiberte, It is said that after 6.0, performance significantly strengthened, or even more than nhibernate, but I did not test, in addition, support for other databases need to install third-party plug-ins, as well as personal feeling too pet big, use up, not flexible. Mybatic.net features and ease of use between nhibernate and EF.

In comparison, we recommend the use of Fluentdata, a lightweight and open source. Netorm Data Persistence Framework

3.3. What is Fluentdata?

Fluentdata: A new lightweight ORM model using FLUENTAPI

Fluentdata is a new member of the Miniature ORM (Micro-orm) family and is designed to be more user-friendly than a large ORM (full ORM). Launched this month, Fluentdata uses the fluent API and supports SQL Server, Azure, Oracle, and MySQL.

Fluentdata's designer Lars-erik Kindblad talked about:

The current ORM frameworks, such as the Entity framework and nhibernate, are too complex and difficult to learn. In addition, because these frameworks themselves abstract the query language and from the database to the. NET objects are too cumbersome to generate, resulting in inefficient SQL.

Fluentdata, which is a lightweight framework, has a simple fluent API and is easy to learn.

Similar to other mini-ORM (such as Dapper and Massive), Fluentdata focuses on performance and ease of use. It allows developers to have more control over SQL than to rely on ORM for automatic generation. Not only can it use SQL to perform queries, additions, and updates, but it can also support the use of stored procedures and transactions. According to the document description, Fluentdata can work with any business object without altering the existing structure.

The following are some of the other features of Fluentdata:

• Multi-result set (multiple ResultSet): Returns multiple datasets under a single database operation;

• Developers can use strongly typed objects or dynamic objects;

• Customize the Entity factory (custom entityfactory) for complex objects that require special handling at the time of creation;

• Ability to add additional database support.

Fluentdata requires. NET 4.0 and supports SQL Server, sqlazure, SQL Server Compact, and Oracle and MySQL using. NET drivers. For further information, such as code samples and free downloads, please visit the Fluentdata on the CodePlex site. (http://fluentdata.codeplex.com/)


3.4. Course Training Objectives:

1. A comprehensive understanding of the new features of C # 4.5 syntax

2. Comprehensive in-depth understanding of what fluentdata is and how to use Fluentdata in conjunction with. NET for database application development

3. Fluentdataapi syntax, features, and best practices through example mastery

3.5. Suitable for students

1. Ability to develop simple database applications using C # syntax skillfully.

2. Learn about SQL statements, or any one of mysql,oracle



Fluentdata lightweight. NET orm Persistence Technology (C#4.5/LINQ/LAMBDA, transaction/storage process, open source framework)

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.