Dab tsi yog t4 template hauv Entity Framework?
Dab tsi yog t4 template hauv Entity Framework?

Video: Dab tsi yog t4 template hauv Entity Framework?

Video: Dab tsi yog t4 template hauv Entity Framework?
Video: Dab laug raws Dais 7/23/2017 2024, Kaum ib hlis
Anonim

Ib tsab ntawv Template Transformation Toolkit ( T4 ) tus qauv yog lub hom phiaj dav dav tus qauv cav; siv T4 peb tuaj yeem tsim C#, VB code, XML, HTML lossis ntawv ntawm txhua yam. Cov cim cim yog siv hauv Visual Studio hauv cov thev naus laus zis zoo li MVC, Lub koom haum Framework , LINQ rau SQL thiab ntau lwm yam uas siv cov cov qauv.

Ib yam li ntawd, t4 template hauv MVC yog dab tsi?

ASP. NET MVC yog siv T4 (Tau ntawv Template Transformation Toolkit) los tsim cov cai tom qab qhov xwm txheej thaum tus Tswj lossis Saib tau ntxiv rau qhov project. T4 yog lub tshuab hluav taws xob hloov kho cov ntawv nyeem raws li cov qauv . A T4 template zoo nkaus li zoo ib yam li lwm yam Web Form sib txuas cov ntawv nyeem yooj yooj yim nrog kev tswj xyuas logic.

Qhov thib ob, Entity Framework yog dab tsi hauv. NET nrog piv txwv? Lub koom haum Framework yog qhov chaw qhib ORM lub moj khaum rau. NET cov ntawv thov txhawb los ntawm Microsoft. Nws ua rau cov neeg tsim khoom ua haujlwm nrog cov ntaub ntawv siv cov khoom ntawm cov chav kawm tshwj xeeb yam tsis tau tsom mus rau cov lus hauv qab database thiab txhua kab uas cov ntaub ntawv no khaws cia.

Hais txog qhov no, Csdl lub luag haujlwm yog dab tsi?

Conceptual schema txhais lus ( CSDL ) yog ib hom lus XML uas piav txog qhov cov chaw , kev sib raug zoo, thiab kev ua haujlwm uas tsim ib lub tswv yim qauv ntawm cov ntaub ntawv-tsav daim ntawv thov. Cov qauv tswv yim no tuaj yeem siv los ntawm cov Lub koom haum Framework los yog WCF Data Services.

t4 code tiam yog dab tsi?

Code tiam thiab T4 Text Templates. Text Template Transformation Toolkit (feem ntau hu ua " T4 ") yog tus qauv pub dawb thiab qhib qhov chaw raws cov ntawv nyeem tiam lub moj khaum suav nrog Visual Studio. T4 cov ntaub ntawv feem ntau yog denoted los ntawm cov ntaub ntawv extension ".

Pom zoo: