.NET Interactive with SQL!| .NET Notebooks in Visual Studio Code

.NET Interactive with SQL!| .NET Notebooks in Visual Studio Code

efcore๋ฅผ ํ†ตํ•œ linq2sql์ž‘์—… ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

image

https://devblogs.microsoft.com/dotnet/net-interactive-with-sql-net-notebooks-in-visual-studio-code/

4 Likes

๊ธฐ์กด์— .NET Interactive ์“ฐ๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ์ด์ œ EF Core๊นŒ์ง€ ๊ฐ€๋Šฅํ•˜๊ตฐ์š”!

1 Like

๊ธ€์„ ์˜ฌ๋ฆฐ๋’ค ํ…Œ์ŠคํŠธํ•ด๋ณด๋‹ˆ identity ํŒจํ‚ค์ง€ ๊ด€๋ จ ์˜ค๋ฅ˜๊ฐ€ ์žˆ์–ด์„œ efcore context ์ƒ์„ฑ ์ž‘์—…์ด ์•ˆ๋˜์–ด ์ด์Šˆ๋“ฑ๋ก์„ ํ–ˆ๋”๋‹ˆ 2๋‹ฌ๋ฐ˜๋งŒ์— ํŒจ์น˜๊ฐ€ ๋˜์—ˆ๋‹จ ๋‚ด์šฉ์„ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. ๊ณ ๋งˆ์šธ๋”ฐ๋ฆ„์ž…๋‹ˆ๋‹ค. ๊ฐ„๋‹จํ•œ DB์ž‘์—…์„ ์‰ฝ๊ฒŒ ํ• ์ˆ˜ ์žˆ๊ฒŒ ๋˜์–ด ๊ธฐ์˜๋„ค์š”~~

#i "nuget:https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
#r "nuget:Microsoft.DotNet.Interactive.SqlServer,*-*"
#!connect mssql --create-dbcontext --kernel-name RazorPagesEF "Persist Security Info=False; Integrated Security=false; Initial Catalog=RazorPages-CRUD; Server=****; User Id=***; Password=***;"
RazorPagesEF.Products.Where(p => p.Id == 7).FirstOrDefault().Display();
RazorPagesEF.Products.Display();
#!sql-RazorPagesEF

select * from Product

๊ฐ„๋‹จํ•œ ํ…Œ์ŠคํŠธ๋‚ด์šฉ์„ ์บก์ณ ํ•˜์—ฌ


์˜ฌ๋ฆฝ๋‹ˆ๋‹ค.

3 Likes

๊ตฟ๊ตฟ์ž…๋‹ˆ๋‹ค! ^^

2 Likes