dotnet/efcore: EF Core is a modern object-database mapper ...

文章推薦指數: 80 %
投票人數:10人

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, ... Skiptocontent {{message}} dotnet / efcore Public Notifications Fork 2.8k Star 11.8k EFCoreisamodernobject-databasemapperfor.NET.ItsupportsLINQqueries,changetracking,updates,andschemamigrations. docs.microsoft.com/ef/ License MITlicense 11.8k stars 2.8k forks Star Notifications Code Issues 1.7k Pullrequests 19 Actions Wiki Security Insights More Code Issues Pullrequests Actions Wiki Security Insights dotnet/efcore Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. main Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 30 branches 186 tags Code Clone HTTPS GitHubCLI UseGitorcheckoutwithSVNusingthewebURL. WorkfastwithourofficialCLI. Learnmore. OpenwithGitHubDesktop DownloadZIP LaunchingGitHubDesktop Ifnothinghappens,downloadGitHubDesktopandtryagain. LaunchingGitHubDesktop Ifnothinghappens,downloadGitHubDesktopandtryagain. LaunchingXcode Ifnothinghappens,downloadXcodeandtryagain. LaunchingVisualStudioCode Yourcodespacewillopenonceready. Therewasaproblempreparingyourcodespace,pleasetryagain. Latestcommit dependabot[bot] BumpMicrosoft.Azure.Cosmosfrom3.30.1to3.31.0(#29310) … af01f04 Oct11,2022 BumpMicrosoft.Azure.Cosmosfrom3.30.1to3.31.0(#29310) Bumps[Microsoft.Azure.Cosmos](https://github.com/Azure/azure-cosmos-dotnet-v3)from3.30.1to3.31.0. -[Releasenotes](https://github.com/Azure/azure-cosmos-dotnet-v3/releases) -[Changelog](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md) -[Commits](Azure/[email protected]) --- updated-dependencies: -dependency-name:Microsoft.Azure.Cosmos dependency-type:direct:production update-type:version-update:semver-minor ... Signed-off-by:dependabot[bot] Signed-off-by:dependabot[bot] Co-authored-by:dependabot[bot]<49699333+dependabot[bot]@users.noreply.github.com> af01f04 Gitstats 13,485 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime .github SupportAADRBACviaTokenCredential(#28644) Aug9,2022 benchmark Mergebranch'release/7.0' Sep15,2022 docs Adddailybuildinfofortoolsandtemplates(#28920) Aug30,2022 eng Updatedependenciesfromhttps://github.com/dotnet/runtimebuild2022… Oct10,2022 rulesets Addentitysplittingsupporttomigrationsnapshot Jun24,2022 src BumpMicrosoft.Azure.Cosmosfrom3.30.1to3.31.0(#29310) Oct11,2022 test Mergebranch'release/7.0' Oct7,2022 tools FixforincludingcollectionentitywhichcontainsJSON Sep8,2022 .editorconfig Staticanalysis:inconsistentnamingandnamespaces(#26919) Dec14,2021 .gitattributes Updategitartifacts Mar13,2017 .gitignore Query:ImplementFirst/Single/LastOrDefaultthrowingbehavior Aug21,2019 All.sln AddMicrosoft.EntityFrameworkCore.Templates(#28678) Aug11,2022 All.sln.DotSettings AllowFKtypeindatabasetobedifferentfromPKtype(#29026) Sep10,2022 Directory.Build.props RemoveDisableImplicitNamespaceImportsconfig(#27545) Mar5,2022 Directory.Build.targets StopflowingMicrosoft.NETCore.App Jun8,2021 EFCore.Cosmos.slnf RenameAnalyzertestprojectname(#22750) Sep25,2020 EFCore.Relational.slnf AddtestingforASP.NETCoreIdentitymodel(#23723) Dec19,2020 EFCore.Runtime.slnf Addaconventionthatbuildsaslimmodeltobeusedatruntime Mar23,2021 EFCore.Sqlite.slnf Query:AddEF.Functions.Random(#23145) Dec22,2020 EFCore.Tools.slnf AddMicrosoft.EntityFrameworkCore.Templates(#28678) Aug11,2022 EFCore.slnf Query:AddEF.Functions.Random(#23145) Dec22,2020 LICENSE.txt UpdatelicensetoMIT Jul23,2021 Microsoft.Data.Sqlite.slnf ⬆️UpdatetoSQLitePCLRaw2.0.4(#22297) Sep4,2020 NuGet.config [main]Updatedependenciesfromdotnet/runtime(#28825) Aug23,2022 README.md UpdateReadme(#29160) Sep20,2022 activate.ps1 Addactivatescripts Feb27,2019 activate.sh Addabilitytosubmithelixjobfromcommandline(#20208) Mar11,2020 azure-pipelines-richnav.yml [main]SwitchtoconsolidatedWindowsbuildimagesandnon-Svcpools(#… Oct5,2022 azure-pipelines.yml [main]SwitchtoconsolidatedWindowsbuildimagesandnon-Svcpools(#… Oct5,2022 build.cmd Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 build.sh Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 global.json Updatedependenciesfromhttps://github.com/dotnet/arcadebuild20221… Oct10,2022 helix.cmd Renamesomereferences(#21757) Jul23,2020 helix.sh Renamesomereferences(#21757) Jul23,2020 restore.cmd Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 restore.sh Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 startvs.cmd UpdatesolutionstoVS2019 Feb6,2019 stylecop.json UpdatelicensetoMIT Jul23,2021 test.cmd Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 test.sh Unlinkoffile'.dotnet/dotnet.exe'failed.ShouldItryagain?(y/n) Feb15,2022 Viewcode Repository EntityFrameworkCore Installation Dailybuilds Basicusage Buildfromsource Contributing Gettingsupport Microsoft.Data.Sqlite Installation Dailybuilds Basicusage Buildfromsource Contributing Gettingsupport Seealso README.md Repository Thisrepositoryishometothefollowing.NETFoundationprojects.TheseprojectsaremaintainedbyMicrosoftandlicensedundertheMITLicense. EntityFrameworkCore Microsoft.Data.Sqlite EntityFrameworkCore EFCoreisamodernobject-databasemapperfor.NET.ItsupportsLINQqueries,changetracking,updates,andschemamigrations.EFCoreworkswithSQLServer,AzureSQLDatabase,SQLite,AzureCosmosDB,MySQL,PostgreSQL,andotherdatabasesthroughaproviderpluginAPI. Installation EFCoreisavailableonNuGet.Installtheproviderpackagecorrespondingtoyourtargetdatabase.Seethelistofprovidersinthedocsforadditionaldatabases. dotnetaddpackageMicrosoft.EntityFrameworkCore.SqlServer dotnetaddpackageMicrosoft.EntityFrameworkCore.Sqlite dotnetaddpackageMicrosoft.EntityFrameworkCore.Cosmos Usethe--versionoptiontospecifyapreviewversiontoinstall. Dailybuilds WerecommendusingthedailybuildstogetthelatestcodeandprovidefeedbackonEFCore.Thesebuildscontainlatestfeaturesandbugfixes;previewsandofficialreleaseslagsignificantlybehind. Basicusage ThefollowingcodedemonstratesbasicusageofEFCore.ForafulltutorialconfiguringtheDbContext,definingthemodel,andcreatingthedatabase,seegettingstartedinthedocs. using(vardb=newBloggingContext()) { //Insertingdataintothedatabase db.Add(newBlog{Url="http://blogs.msdn.com/adonet"}); db.SaveChanges(); //Querying varblog=db.Blogs .OrderBy(b=>b.BlogId) .First(); //Updating blog.Url="https://devblogs.microsoft.com/dotnet"; blog.Posts.Add( newPost { Title="HelloWorld", Content="IwroteanappusingEFCore!" }); db.SaveChanges(); //Deleting db.Remove(blog); db.SaveChanges(); } Buildfromsource MostpeopleuseEFCorebyinstallingpre-buildNuGetpackages,asshownabove.Alternately,thecodecanbebuiltandpackagescanbecreateddirectlyonyourdevelopmentmachine. Contributing Wewelcomecommunitypullrequestsforbugfixes,enhancements,anddocumentation.SeeHowtocontributeformoreinformation. Gettingsupport Ifyouhaveaspecificquestionaboutusingtheseprojects,weencourageyoutoaskitonStackOverflow.Ifyouencounterabugorwouldliketorequestafeature,submitanissue.Formoredetails,seegettingsupport. Microsoft.Data.Sqlite Microsoft.Data.SqliteisalightweightADO.NETproviderforSQLite.TheEFCoreproviderforSQLiteisbuiltontopofthislibrary.However,itcanalsobeusedindependentlyorwithotherdataaccesslibraries. Installation ThelateststableversionisavailableonNuGet. dotnetaddpackageMicrosoft.Data.Sqlite Usethe--versionoptiontospecifyapreviewversiontoinstall. Dailybuilds WerecommendusingthedailybuildstogetthelatestcodeandprovidefeedbackonMicrosoft.Data.Sqlite.Thesebuildscontainlatestfeaturesandbugfixes;previewsandofficialreleaseslagsignificantlybehind. Basicusage ThislibraryimplementsthecommonADO.NETabstractionsforconnections,commands,datareaders,andsoon.Formoreinformation,seeMicrosoft.Data.SqliteonMicrosoftDocs. using(varconnection=newSqliteConnection("DataSource=Blogs.db")) { connection.Open(); varcommand=connection.CreateCommand(); command.CommandText="SELECTUrlFROMBlogs"; using(varreader=command.ExecuteReader()) { while(reader.Read()) { varurl=reader.GetString(0); } } } Buildfromsource MostpeopleuseMicrosoft.Data.Sqlitebyinstallingpre-buildNuGetpackages,asshownabove.Alternately,thecodecanbebuiltandpackagescanbecreateddirectlyonyourdevelopmentmachine. Contributing Wewelcomecommunitypullrequestsforbugfixes,enhancements,anddocumentation.SeeHowtocontributeformoreinformation. Gettingsupport Ifyouhaveaspecificquestionaboutusingtheseprojects,weencourageyoutoaskitonStackOverflow.Ifyouencounterabugorwouldliketorequestafeature,submitanissue.Formoredetails,seegettingsupport. Seealso Documentation Roadmap Weeklystatusupdates Releaseplanningprocess HowtowriteanEFCoreprovider Security Codeofconduct About EFCoreisamodernobject-databasemapperfor.NET.ItsupportsLINQqueries,changetracking,updates,andschemamigrations. docs.microsoft.com/ef/ Topics c-sharp orm database entity-framework dotnet-core dotnet-standard hacktoberfest dotnet-framework aspnet-product Resources Readme License MITlicense Codeofconduct Codeofconduct Stars 11.8k stars Watchers 937 watching Forks 2.8k forks Releases 147 .NETCore3.1.30 Latest Oct11,2022 +146releases Packages0 Nopackagespublished Usedby1 @ENIACx64 / VUT-ICS-PROJ Contributors286 +275contributors Languages C# 99.4% PowerShell 0.4% Shell 0.2% CMake 0.0% Batchfile 0.0% Python 0.0% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?