Video: Dab tsi yog daim ntawv qhia hauv Entity Framework?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Entity Framework . Nws yog ib qho cuab yeej los nkag rau hauv database. Qhov tseeb dua, nws tau muab cais ua Qhov Object / Relational Mapper (ORM) uas txhais tau tias nws qhia cov ntaub ntawv hauv cov ntaub ntawv sib txheeb rau hauv cov khoom ntawm peb daim ntawv thov.
Tsis tas li ntawd, ModelBuilder yog dab tsi hauv Entity Framework?
Entity Framework Fluent API yog siv los teeb tsa cov chav kawm sau los hla cov rooj sib tham. Hauv Lub Koom Haum Ua Haujlwm Core, ua ModelBuilder chav kawm ua raws li API Fluent. Los ntawm kev siv nws, peb tuaj yeem teeb tsa ntau yam sib txawv, raws li nws muab ntau txoj kev teeb tsa ntau dua li cov ntaub ntawv annotation cwj pwm.
Tsis tas li ntawd, kuv yuav ua li cas daim ntawv qhia txheej txheem khaws cia hauv Entity Framework? Daim ntawv qhia tus neeg koom nrog rau cov txheej txheem khaws cia
- Txoj cai-nias rau tus neeg lub hom phiaj thiab xaiv Khaws Cov Txheej Txheem Mapping.
- Cov txheej txheem khaws cia ua daim phiaj xwm tshwm sim nyob rau hauv Mapping Details window.
- Nyem.
- Default mappings ntawm cov txheej txheem khaws cia tsis muaj thiab cov khoom siv tshwm sim.
Kuj Paub, Kuv yuav siv Entity Framework li cas?
- Yam yuavtsum tau kawm uantej. Visual Studio 2017.
- Tsim ib qho MVC web app. Qhib Visual Studio thiab tsim C# lub vev xaib siv ASP. NET Web Application (.
- Teem lub site style.
- Nruab Qhov Chaw Ua Haujlwm 6.
- Tsim cov ntaub ntawv qauv.
- Tsim cov ntsiab lus database.
- Pib pib DB nrog cov ntaub ntawv xeem.
- Teeb tsa EF 6 kom siv LocalDB.
OnModelCreating yog dab tsi?
Kev teeb tsa raug siv los ntawm ntau txoj hauv kev nthuav tawm los ntawm Microsoft. Chav kawm DbContext muaj ib txoj kev hu ua OnModelCreating uas siv ib qho piv txwv ntawm ModelBuilder ua qhov parameter. Txoj kev no yog hu los ntawm lub moj khaum thaum koj cov ntsiab lus tau tsim thawj zaug los tsim cov qauv thiab nws cov duab kos hauv nco.
Pom zoo:
Daim ntawv qhia ncuav qab zib piav qhia nrog piv txwv yog dab tsi?
Cov kab kos ncuav qab zib yog siv hauv kev tuav cov ntaub ntawv thiab yog cov kab kos kab sib faib ua ntu uas txhua tus sawv cev rau tus nqi. Daim duab ncuav qab zib tau muab faib ua ntu (lossis 'slices') los sawv cev rau qhov sib txawv ntawm qhov ntau thiab tsawg. Piv txwv li, nyob rau hauv daim ntawv qhia ncuav qab zib no, lub voj voog sawv cev rau tag nrho cov chav kawm
Dab tsi yog qhov txawv ntawm daim duab radar thiab daim ntawv qhia khoom?
Cov kab kos duab yog tsim los tso saib cov ntaub ntawv ua lag luam. Radar kab kos yog qhov zoo tshaj plaws rau kev qhia qhov tseem ceeb txheeb ze rau qhov chaw nruab nrab thiab yog qhov tsim nyog rau kev qhia tshwj xeeb rau qhov sib txawv
Dab tsi yog daim ntawv pov thawj hauv daim ntawv tshawb fawb?
Kev xav ntawm daim ntawv lees paub yog qhov tseem ceeb hauv kev tshawb nrhiav. Ib 'kev tshawb fawb warrant' yog li hais txog txoj hauv kev uas peb cov ntaub ntawv txhawb nqa cov lus thov uas peb ua. Daim ntawv lees paub txuas peb lub ntsiab lus tseem ceeb rau kev kawm, cov ntaub ntawv thiab kev tshuaj xyuas thiab cov lus thov peb ua thaum kawg
Cov ntaub ntawv txuas ntxiv rau daim ntawv nthuav qhia yog dab tsi?
Cov ntaub ntawv nthuav dav dav dav thiab lawv cov ntaub ntawv tawm tswv yim suav nrog XLSX (Microsoft Excel Qhib XML Spreadsheet), ODS (OpenDocument Spreadsheet) thiab XLS (Microsoft Excel Binary File Format)
Txoj hauv kev zoo tshaj plaws rau daim ntawv thov upload cov ntaub ntawv loj hauv s3 yog dab tsi?
Cov ntaub ntawv loj tshaj plaws uas tuaj yeem muab tso rau hauv Amazon S3 thoob hauv ib qho kev ua haujlwm PUT yog 5 GB. Yog tias koj xav upload cov khoom loj (> 5 GB), koj yuav txiav txim siab siv multipart upload API, uas tso cai rau upload cov khoom ntawm 5 MB mus txog 5 TB