EF Code yog dab tsi?
EF Code yog dab tsi?

Video: EF Code yog dab tsi?

Video: EF Code yog dab tsi?
Video: Data Science with Python! Joining Tables Without a Common Column 2024, Kaum ib hlis
Anonim

Entity Framework tau qhia txog qhov Code -Thawj mus kom ze nrog Entity Framework 4.1. Raws li koj tuaj yeem pom hauv daim duab saum toj no, EF API yuav tsim cov ntaub ntawv raws li koj cov chav kawm sau npe thiab teeb tsa. Qhov no txhais tau tias koj yuav tsum pib coding ua ntej hauv C# lossis VB. NET thiab tom qab ntawd EF yuav tsim cov ntaub ntawv los ntawm koj code.

Ib sab ntawm qhov no, dab tsi yog code thawj txoj hauv kev hauv EF?

Code thawj mus kom ze cia peb hloov peb cov chav kawm coded rau hauv daim ntawv thov database, uas txhais tau tias code ua ntej cia peb txheeb xyuas peb tus qauv sau npe siv POCO (cov khoom qub qub CLR) chav kawm tsis yog siv cov ntaub ntawv XML-based EDMX uas tsis muaj kev vam khom nrog Lub koom haum Framework.

Qhov thib ob, kuv yuav ua li cas thiaj tsim tau lub database EF Code Ua ntej? Tsim Cov Ntaub Ntawv Tshiab Siv Cov Cai Ua Ntej Hauv Chaw Ua Haujlwm

  1. Kauj ruam 1 - Tsim qhov project daim foos.
  2. Kauj Ruam 2 - Ntxiv qhov chaw ua haujlwm rau hauv qhov project tsim tshiab siv NuGet pob.
  3. Kauj ruam 3 - Tsim qauv rau hauv qhov project.
  4. Kauj ruam 4 - Tsim cov ntsiab lus hauv chav kawm rau hauv qhov project.
  5. Kauj ruam 5 - Tshaj tawm ntaus DbSet rau txhua chav kawm ntawm tus qauv.
  6. Kauj Ruam 6 - Tsim ntu kev nkag.

Tib neeg kuj nug, EF database yog dab tsi?

Lub koom haum Framework . Lub koom haum Framework yog ib qho khoom siv sib txuas (O / RM) uas tso cai rau. NET developers ua hauj lwm nrog a database siv. NET cov khoom. Nws tshem tawm qhov xav tau rau feem ntau ntawm cov ntaub ntawv nkag-kwv yees uas cov neeg tsim khoom feem ntau xav tau sau.

Puas yog EF yog ORM?

Lub koom haum Framework ( EF ) yog ib qhov chaw qhib qhov chaw sib txheeb ze ze ( ORM ) lub moj khaum rau ADO. NET. Nws yog ib feem ntawm. NET Framework, tab sis txij li thaum Lub koom haum Framework version 6 nws yog cais los ntawm. NET moj khaum.

Pom zoo: