????LINQ????SQL??
?????linqpad ???????[ 2017/3/21 10:36:39 ] ????????SQL ????? LINQ
????LINQ ????????????????????????????????????????????????????????????????????
??????????
????????????????????????????????????????”WA”???????????????????????? ???????????????????????????:
????string state = "WA";
????var query =
????from c in db.Customers
????where c.Address.State == state
????...
??????????? DbCommand ????????????????????? SQL ??????? LINQ ???????????????????????????????????????????????——???????ú?????
??????? LINQ ?????????????????????????????????????ν??????磬????д??????????????£?
????IQueryable GetCustomers (string state?? decimal? minPurchase)
????{
????var query = Customers.AsQueryable();
????if (state != null)
????query = query.Where (c => c.Address.State == state);
????if (minPurchase != null)
????query = query.Where (c => c.Purchases.Any (p => p.Price > minPurchase.Value));
????return query;
????}
???????????????? state ??? minPurchase ????????????????????????????????????????? SQL ???????????
????SELECT [t0].[ID]?? [t0].[Name]?? [t0].[AddressID]
????FROM [Customer] AS [t0]
?????????????????????? state ?? minPurchase ?????LINQ ?? SQL ??????????????ν????????б???????????
????SELECT [t0].[ID]?? [t0].[Name]?? [t0].[AddressID]
????FROM [Customer] AS [t0]
????LEFT OUTER JOIN [Address] AS [t1] ON [t1].[ID] = [t0].[AddressID]
????WHERE (EXISTS(
????SELECT NULL AS [EMPTY]
????FROM [Purchase] AS [t2]
????WHERE ([t2].[Price] > @p0) AND ([t2].[CustomerID] = [t0].[ID])
????)) AND ([t1].[State] = @p1)
???????????????????????? IQueryable???????????????????????????? SQL ????????С???????????y???????ν??????????????????????
?????????????
?????????????У????????? state ??????????????????????????????????????????????????????????????????????????????????????????????????ū????????????????????????????????????????????????????????????????????
????????????
????LINQ ???????????????????Щ?????????????????д???????????????????????????????????????????????????????????????г??????裨??????????????????????????????????????????????????????????????????????????????????????????÷????????????? LINQ????????????? AsEnumerable() ?????????У?????????????????????鶼???????????С?
??????????? LINQ ?????????
???????? LINQ ??????????????????????? SQL???????????? 95% ????????????????????????SQL:
????· ?????????????? (?????????????????????????????)??
????· ??Щ?漰??? select ????????????????Щ????в????????????
????· ???????????????????????
????????????????????????????? SQL?? (????????? LINQ ??????????????????????????????????????洢?????????????SQL ?????????)???????????? SQL ?б?д??????????? SQL ?? LINQ ???????? ???????????? LINQ ????????????Щ??????
?????????????????????????????????????????????? LINQ ?? — LINQ ?????????????? XML DOM ?????????á?????????????????????? XmlDocument ?? DOM??LINQ to XML ?? DOM ?????????????????Ч?????????
??????????????? SQL?? LINQ ??????????????????????д?????????????? LINQ ??? SQL ?????ɡ?
?????? LINQ ??????
?????????????? LINQ ??????????????????????Ч???
??????????ó?????д?????????????????????? LINQ ?????????????????? LINQ ?? SQL ???? Entity Framework ?? API????????????????????俳?????????????????????????????ɡ?
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
?????????????????????????Щ????????????????????TC???????????????Щ???????????????????????????????????????????????(java .net ?????)???mysql???????????????????ж????д???Python???????????????(DB2)??????BufferPool????????????????????????????????6??????????????????滮???????????????-????????SQL Server???????????????????λ?????PHP??SQL????????????????????Pythonд???NoSQL????????? SQL ?е????????????? SQL ?е?????????Java???????:?????MySQL???????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????