You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
16 KiB
JavaScript

12 months ago
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[74],{754:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>x,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var t=r(5893),o=r(1151);const s={id:"dbcontext-start",title:"9.1 \u5165\u95e8\u7b80\u8981",sidebar_label:"9.1 \u5165\u95e8\u7b80\u8981 \u2728"},i=void 0,c={id:"dbcontext-start",title:"9.1 \u5165\u95e8\u7b80\u8981",description:"9.1.1 \u5165\u95e8\u51c6\u5907",source:"@site/docs/dbcontext-start.mdx",sourceDirName:".",slug:"/dbcontext-start",permalink:"/docs/dbcontext-start",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/dbcontext-start.mdx",tags:[],version:"current",lastUpdatedBy:"MonkSoul",lastUpdatedAt:1682389320,formattedLastUpdatedAt:"Apr 25, 2023",frontMatter:{id:"dbcontext-start",title:"9.1 \u5165\u95e8\u7b80\u8981",sidebar_label:"9.1 \u5165\u95e8\u7b80\u8981 \u2728"},sidebar:"docs",previous:{title:"9. \u6570\u636e\u5e93\u64cd\u4f5c\u6307\u5357\uff08EFCore\uff09",permalink:"/docs/category/efcore"},next:{title:"9.2 \u6570\u636e\u5e93\u4e0a\u4e0b\u6587",permalink:"/docs/dbcontext"}},d={},l=[{value:"9.1.1 \u5165\u95e8\u51c6\u5907",id:"911-\u5165\u95e8\u51c6\u5907",level:2},{value:"9.1.1.1 \u5b89\u88c5\u5bf9\u5e94\u6570\u636e\u5e93\u5305",id:"9111-\u5b89\u88c5\u5bf9\u5e94\u6570\u636e\u5e93\u5305",level:3},{value:"9.1.1.2 \u521b\u5efa\u6570\u636e\u5e93\u4e0a\u4e0b\u6587",id:"9112-\u521b\u5efa\u6570\u636e\u5e93\u4e0a\u4e0b\u6587",level:3},{value:"9.1.1.3 \u914d\u7f6e\u8fde\u63a5\u5b57\u7b26\u4e32",id:"9113-\u914d\u7f6e\u8fde\u63a5\u5b57\u7b26\u4e32",level:3},{value:"9.1.1.4 \u5404\u7c7b\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u914d\u7f6e\u793a\u4f8b",id:"9114-\u5404\u7c7b\u6570\u636e\u5e93\u8fde\u63a5\u5b57\u7b26\u4e32\u914d\u7f6e\u793a\u4f8b",level:3},{value:"9.1.1.5 \u6ce8\u518c\u6570\u636e\u5e93\u4e0a\u4e0b\u6587",id:"9115-\u6ce8\u518c\u6570\u636e\u5e93\u4e0a\u4e0b\u6587",level:3},{value:"9.1.1.6 <code>Code First</code> \u8bf4\u660e",id:"9116-code-first-\u8bf4\u660e",level:3},{value:"9.1.2 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"912-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"911-\u5165\u95e8\u51c6\u5907",children:"9.1.1 \u5165\u95e8\u51c6\u5907"}),"\n",(0,t.jsx)(n.admonition,{title:"\u5165\u95e8\u6761\u4ef6",type:"note",children:(0,t.jsxs)(n.p,{children:["\u5bf9 ",(0,t.jsx)(n.code,{children:"EF/EFCore"})," \u6709\u4e00\u5b9a\u57fa\u7840\u4e86\u89e3\uff0c\u8fd8\u672a\u63a5\u89e6\u7684\u53ef\u5148\u770b ",(0,t.jsx)(n.a,{href:"https://docs.microsoft.com/zh-cn/ef/core/",children:"\u3010EFCore \u57fa\u7840\u3011"})]})}),"\n",(0,t.jsx)(n.h3,{id:"9111-\u5b89\u88c5\u5bf9\u5e94\u6570\u636e\u5e93\u5305",children:"9.1.1.1 \u5b89\u88c5\u5bf9\u5e94\u6570\u636e\u5e93\u5305"}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["\u5728\u672c\u7ae0\u8282\u6240\u5728\u7684\u7c7b\u522b\u4e2d\uff0c\u6240\u6709\u6570\u636e\u5e93\u64cd\u4f5c\u529f\u80fd\u5747\u9700\u8981\u4f9d\u8d56 ",(0,t.jsx)(n.code,{children:"EntityFramework Core"})," \u6846\u67b6\uff0c\u4f46 ",(0,t.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u5e95\u5c42\u5e76\u672a\u96c6\u6210 ",(0,t.jsx)(n.code,{children:"EntityFramework Core"})," \u5305\uff0c\u800c\u662f\u91c7\u7528\u52a8\u6001\u52a0\u8f7d\u7a0b\u5e8f\u96c6\u65b9\u5f0f\u81ea\u52a8\u8f7d\u5165\u3002"]})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsxs)(n.strong,{children:["\u6240\u4ee5\uff0c\u5982\u9700\u4f7f\u7528\u672c\u5927\u7c7b\u6570\u636e\u5e93\u529f\u80fd\uff0c\u9700\u5b89\u88c5\u5bf9\u5e94\u7684 ",(0,t.jsx)(n.code,{children:"EntityFramework Core"})," \u6570\u636e\u5e93\u5305\uff1a"]})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"SqlServer"}),"\uff1a",(0,t.jsx)(n.code,{children:"Microsoft.EntityFrameworkCore.SqlServer"})," (\u652f\u6301 SqlServer 2005 +)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0