Cov ntaub ntawv cov noob hauv SQL Server yog dab tsi?
Cov ntaub ntawv cov noob hauv SQL Server yog dab tsi?

Video: Cov ntaub ntawv cov noob hauv SQL Server yog dab tsi?

Video: Cov ntaub ntawv cov noob hauv SQL Server yog dab tsi?
Video: Data Visualization with Tableau! Refreshing Data Sources 2024, Kaum ib hlis
Anonim

Seeding ib tug database yog ib tug txheej txheem nyob rau hauv uas ib tug thawj txheej ntawm cov ntaub ntawv yog muab rau ib tug database thaum nws raug ntsia. Nws yog tshwj xeeb tshaj yog pab tau thaum peb xav populate lub database nrog cov ntaub ntawv peb xav txhim kho yav tom ntej.

Yog li ntawd, cov ntaub ntawv noob txhais li cas?

Cov ntaub ntawv noob hais txog qhov pib cov ntaub ntawv muab nrog rau qhov system rau kev cob qhia, kev sim, lossis ua qauv rau cov cov ntaub ntawv uas koj nkag. Piv txwv li: Siebel nkoj nrog cov hauv qab no noob data : lub koom haum, kev faib tawm, txoj haujlwm, lub luag haujlwm, thiab qee cov ntaub ntawv neeg ua haujlwm.

Ib sab saum toj no, dab tsi yog txoj kev noob hauv Entity Framework? Lub Koom Haum Ua Haujlwm - Noob Database. Kev tshaj tawm. Hauv Lub Koom Haum Ua Haujlwm , Noob tau qhia hauv EF 4.1 thiab ua haujlwm nrog database initializers. General tswv yim ntawm a Noob Method yog los pib cov ntaub ntawv rau hauv cov ntaub ntawv uas tau tsim los ntawm Code First lossis hloov zuj zus los ntawm Migrations.

migration thiab seeding yog dab tsi?

Taw qhia Migration thiab Seeding Kev tsiv teb tsaws yog zoo li kev tswj hwm version rau koj cov ntaub ntawv, tso cai rau koj pab neeg kom hloov kho tau yooj yim thiab sib qhia daim ntawv thov cov ntaub ntawv schema. Kev tsiv teb tsaws yog feem ntau ua ke nrog Laravel's schema builder kom yooj yim tsim koj daim ntawv thov database schema.

Yuav ua li cas kuv cog cov ntaub ntawv hauv EF core?

Raws li version 2.1, Nthuav lub Ncej Core muaj ib qho kev cai API rau kev thov noob data mus rau cov ntaub ntawv raws li ib feem ntawm koj txoj kev tsiv teb tsaws - HasData txoj kev ntawm EntityTypeBuilder txoj kev, uas tau nthuav tawm los ntawm ModelBuilder. Txoj hauv kev, nkag tau rau hauv OnModelCreating txoj kev ntawm chav kawm DbContext.

Pom zoo: