Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Dynamic mapping and conversion method of data table and entity class

A technology of dynamic mapping and conversion methods, applied in the field of data processing, can solve problems such as time-consuming and labor-intensive, and achieve the effect of strong practicability and easy promotion

Inactive Publication Date: 2015-06-24
INSPUR GROUP CO LTD
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Every time you convert to an entity type, you need to manually write the conversion code, which is time-consuming and laborious

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic mapping and conversion method of data table and entity class

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0063] Embodiment: the final realization of the present invention is a DLL under the .NET environment, and in use, following steps are arranged:

[0064] Step 1: First reference this DLL in the code project, and add the namespace INSPUR.Dynamic.AutoMap to the related class;

[0065] Step 2: At the appropriate code position, according to the target object type and source object type, construct a string form, such as:

[0066] Fr["LastName "] to UserName, Fr["EmployeeID "] to UserID

[0067] Step 3: Call the method Select ,Such as:

[0068] var users = dt. AsEnumerable()

[0069] .AsQueryable()

[0070] .Select ("Fr[\"LastName\"] to UserName,

[0071] Fr[\"EmployeeID\"] to UserID");

[0072] In the above code, dt is the source object data table DataTable, User is the target object entity class, "Fr[\"LastName\"] to UserName, Fr [\"EmployeeID\"] to UserID" is the string mapping relationship expression, Since there ar...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a dynamic mapping and conversion method of a data table and an entity class. The method comprises the following steps that a mapping relation description character string between a source data object Data Table and a target data object entity is constructed, data extraction is performed on the source data object Data Table, and data extracted from a source data object are converted into the target data object entity. Compared with the prior art, the dynamic mapping and conversion method of the data table and the entity class achieves rapid capture of various data in a database, achieves modeled displaying of the various data, is high in practicability and is easy to popularize.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a highly practical, dynamic mapping and conversion method between data tables and entity classes. Background technique [0002] Object Relational Mapping (ORM, or O / RM, or O / R mapping) is a program technology used to implement data conversion between different types of systems in an object-oriented programming language. Generally, the source object type and the target object type need to be constructed in advance. The target object type must be strongly typed or hard-coded, and both the source object type and the target object type must have a more complex Schema description. [0003] LINQ is the abbreviation of Language Integrated Query, which is a feature integrated in the .NET programming language. It has become an integral part of programming languages. When writing programs, you can get good compile-time syntax checking, rich metadata, Intellisense, static typing an...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/288
Inventor 田尚杰
Owner INSPUR GROUP CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products