Aram Tchekrekjian (@AramT87) header
Aram Tchekrekjian (@AramT87) profile picture

Get Better in .NET and C# from Microsoft MVP for developer technologies |Technical Solutions Architect at MoDEE | Blog Founder https://teapawt.net/t.co/vWKJH8Hz5x

Amman
Joined January 2010
Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)Photo by Aram Tchekrekjian (@AramT87)
๐Ÿงต Follow this tweet #thread for tutorials in ASP .NET Core Web API from my blog codingsonata.com โšก๏ธFeel free to #Like and #retweet #aspnetcore #csharp #tutorials #coding #development #blog #webdev #devcommunity #CodeNewbies #technology #appdevelopment
1
2
8
Encrypting your data doesn't necessarily mean it's secure. Can you guarantee that nobody has tampered with it? This is where ๐—”๐˜‚๐˜๐—ต๐—ฒ๐—ป๐˜๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐—ฑ ๐—˜๐—ป๐—ฐ๐—ฟ๐˜†๐—ฝ๐˜๐—ถ๐—ผ๐—ป comes in. In .NET, the AesGcm class provides authenticated encryption, combining three essential security properties: ๐Ÿ”’ ๐—–๐—ผ๐—ป๐—ณ๐—ถ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐—ฎ๐—น๐—ถ๐˜๐˜†: Prevents unauthorized access to plaintext. ๐Ÿ›ก๏ธ ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ถ๐˜๐˜†: Detects unauthorized data modifications. ๐Ÿ”‘ ๐—”๐˜‚๐˜๐—ต๐—ฒ๐—ป๐˜๐—ถ๐—ฐ๐—ถ๐˜๐˜†: Verifies that the data was encrypted by someone possessing the key. Unlike AES-CBC alone, AES-GCM generates an authentication tag that must be validated during decryption. If authentication fails, decryption fails. ๐—•๐—ฒ๐˜€๐˜ ๐—ฝ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ๐˜€ ๐—ถ๐—ป .๐—ก๐—˜๐—ง: โ†’ Use a securely generated 256-bit key. โ†’ Generate a fresh 12-byte nonce per encryption. โ†’ Use a 16-byte authentication tag. โ†’ Never reuse a nonce with the same key. โ†’ Create and dispose of an AesGcm instance per operation. โ†’ Store encryption keys separately and securely. You can also use ๐—”๐—ฑ๐—ฑ๐—ถ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—”๐˜‚๐˜๐—ต๐—ฒ๐—ป๐˜๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐—ฑ ๐——๐—ฎ๐˜๐—ฎ (AAD) to protect metadata against tampering without encrypting it. Don't just encrypt your data. Authenticate it. ๐Ÿ” Repost this to help more .NET developers build secure applications and avoid common encryption mistakes. ๐Ÿš€ Follow me for more practical insights on .NET, software architecture, and secure software engineering.
1
1
55
๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ถ๐˜€๐—ปโ€™๐˜ ๐—ฟ๐—ฒ๐—ฎ๐—น๐—น๐˜† ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ. One small coding mistake can compromise the scalability of your entire .NET application. โŒ ๐—ช๐—ฟ๐—ผ๐—ป๐—ด ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต ๐˜ท๐˜ข๐˜ณ ๐˜ถ๐˜ด๐˜ฆ๐˜ณ = ๐˜Ž๐˜ฆ๐˜ต๐˜œ๐˜ด๐˜ฆ๐˜ณ๐˜ˆ๐˜ด๐˜บ๐˜ฏ๐˜ค().๐˜™๐˜ฆ๐˜ด๐˜ถ๐˜ญ๐˜ต; โœ… ๐—–๐—ผ๐—ฟ๐—ฟ๐—ฒ๐—ฐ๐˜ ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต ๐˜ท๐˜ข๐˜ณ ๐˜ถ๐˜ด๐˜ฆ๐˜ณ = ๐˜ข๐˜ธ๐˜ข๐˜ช๐˜ต ๐˜Ž๐˜ฆ๐˜ต๐˜œ๐˜ด๐˜ฆ๐˜ณ๐˜ˆ๐˜ด๐˜บ๐˜ฏ๐˜ค(); Both return the same result when the operation succeeds. But they behave very differently under load. ๐Ÿ”ด ๐—จ๐˜€๐—ถ๐—ป๐—ด .๐—ฅ๐—ฒ๐˜€๐˜‚๐—น๐˜ โ€ข Blocks the calling thread until completion. โ€ข Can cause thread pool starvation. โ€ข Can introduce deadlocks in certain environments. โ€ข Wraps exceptions in AggregateException. โ€ข Reduces application scalability under heavy load. ๐ŸŸข ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—ฎ๐˜„๐—ฎ๐—ถ๐˜ โ€ข Asynchronously waits without blocking the calling thread. โ€ข Allows threads to serve other requests during I/O. โ€ข Preserves asynchronous execution. โ€ข Propagates exceptions directly. โ€ข Improves resource utilization under concurrent workloads. Imagine hundreds of concurrent HTTP requests waiting for database queries or external API responses. With .Result, you risk exhausting available threads. With await, those threads remain available to process other requests while I/O completes. This is particularly important in ASP.NET ๐—–๐—ผ๐—ฟ๐—ฒ applications. ๐Ÿ’ก ๐—ฃ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฎ๐—น ๐˜๐—ถ๐—ฝ: Keep your execution chain asynchronous from the controller down to the database. Avoid .Result, .Wait() and .GetAwaiter().GetResult() in asynchronous request paths. Remember: Asynchronous programming isn't necessarily about making individual requests faster. It's about handling more concurrent requests efficiently. How many .Result calls are still hiding in your codebase? โ™ป๏ธ Repost to help other .NET developers build more scalable applications.
34
๐Ÿš€ ๐—ฌ๐—ผ๐˜‚๐—ฟ .๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐˜‚๐—ฝ๐—ด๐—ฟ๐—ฎ๐—ฑ๐—ฒ ๐—ถ๐˜€ ๐—ผ๐—ป๐—น๐˜† ๐—ฎ๐˜€ ๐—ด๐—ผ๐—ผ๐—ฑ ๐—ฎ๐˜€ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ฎ๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€ ๐—น๐—ฎ๐˜†๐—ฒ๐—ฟ. And Devart just made upgrading more interesting, with new dotConnect capabilities AND up to 40% OFF this Black Friday! ๐Ÿ”ฅ Here's why .NET developers should pay attention. ๐Ÿ” ๐—™๐—ถ๐—ฟ๐˜€๐˜, ๐˜„๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—ฑ๐—ผ๐˜๐—–๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜? It's Devart's suite of ADO .NET data providers that helps .NET applications connect to databases and cloud services. Think Oracle, PostgreSQL, MySQL, SQL Server, SQLite, Salesforce, and more. You get capabilities such as connection pooling, transactions, secure connectivity, and Entity Framework Core integration. โšก ๐—ก๐—ผ๐˜„, ๐˜„๐—ต๐—ฎ๐˜'๐˜€ ๐—ป๐—ฒ๐˜„? The latest dotConnect release introduces .NET 11 compatibility and EF Core 11 support across multiple providers, including Oracle, PostgreSQL, MySQL, SQLite, and DB2. But this goes beyond compatibility: โœ… JSON partial updates and improved complex type mapping. โœ… Expanded LINQ support and migration capabilities. โœ… UseServerVersion() to configure server compatibility without an extra detection connection. โœ… SSL over SSH tunnels for MySQL and PostgreSQL. โœ… Improved PostgreSQL batch operation performance. ๐Ÿ’ก ๐—ช๐—ต๐˜† ๐—ฑ๐—ผ๐—ฒ๐˜€ ๐˜๐—ต๐—ถ๐˜€ ๐—บ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ? Because upgrading your framework is only part of the job. Your database providers must also support the features, security requirements, and performance characteristics your applications depend on. And Devart's connectivity ecosystem extends beyond .NET: ๐Ÿ”น ๐—ข๐——๐—•๐—– ๐——๐—ฟ๐—ถ๐˜ƒ๐—ฒ๐—ฟ๐˜€ for connecting databases and cloud applications to ODBC-compatible tools. ๐Ÿ”น ๐—ฃ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—–๐—ผ๐—ป๐—ป๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ๐˜€ for data engineering, automation, and analytics workflows. ๐Ÿ”ฅ ๐—›๐—ฒ๐—ฟ๐—ฒ'๐˜€ ๐˜๐—ต๐—ฒ ๐—•๐—น๐—ฎ๐—ฐ๐—ธ ๐—™๐—ฟ๐—ถ๐—ฑ๐—ฎ๐˜† ๐—ฏ๐—ผ๐—ป๐˜‚๐˜€! Devart is offering ๐—จ๐—ฃ ๐—ง๐—ข ๐Ÿฐ๐Ÿฌ% ๐—ข๐—™๐—™ on selected database tools and connectivity solutions, including dotConnect, ODBC drivers, and Python connectors. ๐Ÿ“… November 18โ€“29, 2026. If you're planning a .NET 11 migration, modernizing your data access layer, or expanding your connectivity stack, this is a great opportunity to explore Devart's solutions at a reduced price. ๐Ÿ‘‰ Explore the offer: lnkd.in/d4NwseeY ๐Ÿ’ฌ ๐—” ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ .๐—ก๐—˜๐—ง ๐—ฑ๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€: When upgrading to a new .NET version, how often do you evaluate your database provider instead of simply updating its NuGet package? Thanks Devart for this great deal and for the collaboration on this post. โ™ป๏ธ Know a .NET developer planning an upgrade? Repost this and help them discover the latest data connectivity improvements while making the most of Devartโ€™s Black Friday offer!
1
48
Aram Tchekrekjian retweeted
๐—ฌ๐—ผ๐˜‚๐—ฟ ASP.NET ๐—–๐—ผ๐—ฟ๐—ฒ ๐—”๐—ฃ๐—œ ๐—บ๐—ถ๐—ด๐—ต๐˜ ๐—ฏ๐—ฒ ๐˜„๐—ผ๐—ฟ๐—ธ๐—ถ๐—ป๐—ด ๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ฒ๐—ฐ๐˜๐—น๐˜†. ๐—•๐˜‚๐˜ ๐—ถ๐˜€ ๐—ถ๐˜ ๐˜€๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ? A single misconfiguration can expose sensitive data, bypass authorization, or leave your API vulnerable to attacks. Here are ๐Ÿญ๐Ÿฑ ๐˜€๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—ฟ๐˜‚๐—น๐—ฒ๐˜€ every .NET developer should follow. ๐Ÿ” ๐Ÿญ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—›๐—ง๐—ง๐—ฃ๐—ฆ Use HTTPS redirection and HSTS to protect communication. ๐Ÿ›ก๏ธ ๐Ÿฎ. ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—˜๐—ป๐—ฑ๐—ฝ๐—ผ๐—ถ๐—ป๐˜๐˜€ Apply authentication and `[Authorize]` where required. ๐Ÿ”‘ ๐Ÿฏ. ๐—ฉ๐—ฎ๐—น๐—ถ๐—ฑ๐—ฎ๐˜๐—ฒ ๐—๐—ช๐—ง ๐—ง๐—ผ๐—ธ๐—ฒ๐—ป๐˜€ Verify issuer, audience, expiration, and cryptographic signature. โœ… ๐Ÿฐ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—”๐˜‚๐˜๐—ต๐—ผ๐—ฟ๐—ถ๐˜‡๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฃ๐—ผ๐—น๐—ถ๐—ฐ๐—ถ๐—ฒ๐˜€ Use role, claim, policy, or resource-based authorization. ๐Ÿ” ๐Ÿฑ. ๐—ฉ๐—ฎ๐—น๐—ถ๐—ฑ๐—ฎ๐˜๐—ฒ ๐—œ๐—ป๐—ฝ๐˜‚๐˜ Never trust incoming requests, even from authenticated users. ๐Ÿ“ฆ ๐Ÿฒ. ๐—จ๐˜€๐—ฒ ๐——๐—ง๐—ข๐˜€ Prevent over-posting and restrict which properties clients can modify. ๐ŸŒ ๐Ÿณ. ๐—–๐—ผ๐—ป๐—ณ๐—ถ๐—ด๐˜‚๐—ฟ๐—ฒ ๐—–๐—ข๐—ฅ๐—ฆ Allow only trusted browser origins, methods, and headers. ๐Ÿšซ ๐Ÿด. ๐—›๐—ถ๐—ฑ๐—ฒ ๐—ฆ๐—ฒ๐—ป๐˜€๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—˜๐—ฟ๐—ฟ๐—ผ๐—ฟ๐˜€ Never expose stack traces or internal implementation details in production. โฑ๏ธ ๐Ÿต. ๐—”๐—ฝ๐—ฝ๐—น๐˜† ๐—ฅ๐—ฎ๐˜๐—ฒ ๐—Ÿ๐—ถ๐—บ๐—ถ๐˜๐—ถ๐—ป๐—ด Reduce brute-force attempts and API abuse. ๐Ÿ“ ๐Ÿญ๐Ÿฌ. ๐—ฃ๐—ฟ๐—ผ๐˜๐—ฒ๐—ฐ๐˜ ๐—Ÿ๐—ผ๐—ด๐˜€ Never log passwords, access tokens, or sensitive personal information. ๐Ÿ”’ ๐Ÿญ๐Ÿญ. ๐—”๐—ฑ๐—ฑ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ๐˜€ Configure HSTS, X-Content-Type-Options, and other relevant headers. ๐Ÿ“ฆ ๐Ÿญ๐Ÿฎ. ๐—จ๐—ฝ๐—ฑ๐—ฎ๐˜๐—ฒ ๐——๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐—ฐ๐—ถ๐—ฒ๐˜€ Keep NuGet packages patched and scan for vulnerabilities. ๐Ÿช ๐Ÿญ๐Ÿฏ. ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—–๐—ผ๐—ผ๐—ธ๐—ถ๐—ฒ๐˜€ Use HttpOnly, Secure, and appropriate SameSite settings. ๐Ÿงน ๐Ÿญ๐Ÿฐ. ๐—ฅ๐—ฒ๐—ฑ๐˜‚๐—ฐ๐—ฒ ๐—”๐˜๐˜๐—ฎ๐—ฐ๐—ธ ๐—ฆ๐˜‚๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ Remove unused endpoints, controllers, and unnecessary functionality. ๐Ÿ” ๐Ÿญ๐Ÿฑ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—ฆ๐˜๐—ฟ๐—ผ๐—ป๐—ด ๐—ฃ๐—ฎ๐˜€๐˜€๐˜„๐—ผ๐—ฟ๐—ฑ ๐—ฃ๐—ผ๐—น๐—ถ๐—ฐ๐—ถ๐—ฒ๐˜€ Use secure password hashing and support MFA when managing user identities. ๐—ฅ๐—ฒ๐—บ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ: Authentication proves who you are. Authorization determines what you can access. Neither replaces proper input validation, secure configuration, or defense in depth. Security should be part of your architecture, not something you add before production. ๐Ÿ’ฌ Which security misconfiguration have you encountered most often in ASP .NET Core projects? ___________________ โ™ป๏ธ Repost to help other .NET developers build more secure applications.
1
1
67
๐—ฌ๐—ผ๐˜‚๐—ฟ ASP.NET ๐—–๐—ผ๐—ฟ๐—ฒ ๐—”๐—ฃ๐—œ ๐—บ๐—ถ๐—ด๐—ต๐˜ ๐—ฏ๐—ฒ ๐˜„๐—ผ๐—ฟ๐—ธ๐—ถ๐—ป๐—ด ๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ฒ๐—ฐ๐˜๐—น๐˜†. ๐—•๐˜‚๐˜ ๐—ถ๐˜€ ๐—ถ๐˜ ๐˜€๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ? A single misconfiguration can expose sensitive data, bypass authorization, or leave your API vulnerable to attacks. Here are ๐Ÿญ๐Ÿฑ ๐˜€๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—ฟ๐˜‚๐—น๐—ฒ๐˜€ every .NET developer should follow. ๐Ÿ” ๐Ÿญ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—›๐—ง๐—ง๐—ฃ๐—ฆ Use HTTPS redirection and HSTS to protect communication. ๐Ÿ›ก๏ธ ๐Ÿฎ. ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—˜๐—ป๐—ฑ๐—ฝ๐—ผ๐—ถ๐—ป๐˜๐˜€ Apply authentication and `[Authorize]` where required. ๐Ÿ”‘ ๐Ÿฏ. ๐—ฉ๐—ฎ๐—น๐—ถ๐—ฑ๐—ฎ๐˜๐—ฒ ๐—๐—ช๐—ง ๐—ง๐—ผ๐—ธ๐—ฒ๐—ป๐˜€ Verify issuer, audience, expiration, and cryptographic signature. โœ… ๐Ÿฐ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—”๐˜‚๐˜๐—ต๐—ผ๐—ฟ๐—ถ๐˜‡๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฃ๐—ผ๐—น๐—ถ๐—ฐ๐—ถ๐—ฒ๐˜€ Use role, claim, policy, or resource-based authorization. ๐Ÿ” ๐Ÿฑ. ๐—ฉ๐—ฎ๐—น๐—ถ๐—ฑ๐—ฎ๐˜๐—ฒ ๐—œ๐—ป๐—ฝ๐˜‚๐˜ Never trust incoming requests, even from authenticated users. ๐Ÿ“ฆ ๐Ÿฒ. ๐—จ๐˜€๐—ฒ ๐——๐—ง๐—ข๐˜€ Prevent over-posting and restrict which properties clients can modify. ๐ŸŒ ๐Ÿณ. ๐—–๐—ผ๐—ป๐—ณ๐—ถ๐—ด๐˜‚๐—ฟ๐—ฒ ๐—–๐—ข๐—ฅ๐—ฆ Allow only trusted browser origins, methods, and headers. ๐Ÿšซ ๐Ÿด. ๐—›๐—ถ๐—ฑ๐—ฒ ๐—ฆ๐—ฒ๐—ป๐˜€๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—˜๐—ฟ๐—ฟ๐—ผ๐—ฟ๐˜€ Never expose stack traces or internal implementation details in production. โฑ๏ธ ๐Ÿต. ๐—”๐—ฝ๐—ฝ๐—น๐˜† ๐—ฅ๐—ฎ๐˜๐—ฒ ๐—Ÿ๐—ถ๐—บ๐—ถ๐˜๐—ถ๐—ป๐—ด Reduce brute-force attempts and API abuse. ๐Ÿ“ ๐Ÿญ๐Ÿฌ. ๐—ฃ๐—ฟ๐—ผ๐˜๐—ฒ๐—ฐ๐˜ ๐—Ÿ๐—ผ๐—ด๐˜€ Never log passwords, access tokens, or sensitive personal information. ๐Ÿ”’ ๐Ÿญ๐Ÿญ. ๐—”๐—ฑ๐—ฑ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ๐˜€ Configure HSTS, X-Content-Type-Options, and other relevant headers. ๐Ÿ“ฆ ๐Ÿญ๐Ÿฎ. ๐—จ๐—ฝ๐—ฑ๐—ฎ๐˜๐—ฒ ๐——๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐—ฐ๐—ถ๐—ฒ๐˜€ Keep NuGet packages patched and scan for vulnerabilities. ๐Ÿช ๐Ÿญ๐Ÿฏ. ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—–๐—ผ๐—ผ๐—ธ๐—ถ๐—ฒ๐˜€ Use HttpOnly, Secure, and appropriate SameSite settings. ๐Ÿงน ๐Ÿญ๐Ÿฐ. ๐—ฅ๐—ฒ๐—ฑ๐˜‚๐—ฐ๐—ฒ ๐—”๐˜๐˜๐—ฎ๐—ฐ๐—ธ ๐—ฆ๐˜‚๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ Remove unused endpoints, controllers, and unnecessary functionality. ๐Ÿ” ๐Ÿญ๐Ÿฑ. ๐—˜๐—ป๐—ณ๐—ผ๐—ฟ๐—ฐ๐—ฒ ๐—ฆ๐˜๐—ฟ๐—ผ๐—ป๐—ด ๐—ฃ๐—ฎ๐˜€๐˜€๐˜„๐—ผ๐—ฟ๐—ฑ ๐—ฃ๐—ผ๐—น๐—ถ๐—ฐ๐—ถ๐—ฒ๐˜€ Use secure password hashing and support MFA when managing user identities. ๐—ฅ๐—ฒ๐—บ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ: Authentication proves who you are. Authorization determines what you can access. Neither replaces proper input validation, secure configuration, or defense in depth. Security should be part of your architecture, not something you add before production. ๐Ÿ’ฌ Which security misconfiguration have you encountered most often in ASP .NET Core projects? ___________________ โ™ป๏ธ Repost to help other .NET developers build more secure applications.
1
1
67
Aram Tchekrekjian retweeted
Replying to @nnennahacks @QodoAI
๐Ÿ’กA practical example: automatically approve a PR that only updates documentation or fixes a minor typo, but require human approval when changes affect authentication, payment logic, or sensitive configurations. That's where risk-based approvals make a real difference. Congrats @QodoAI for this huge release!
1
2
23
๐—”๐—œ ๐—ฎ๐—ด๐—ฒ๐—ป๐˜๐˜€ ๐—ฐ๐—ฎ๐—ป ๐˜„๐—ฟ๐—ถ๐˜๐—ฒ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ถ๐—ป ๐—บ๐—ถ๐—ป๐˜‚๐˜๐—ฒ๐˜€. ๐—ช๐—ต๐˜† ๐—ฎ๐—ฟ๐—ฒ ๐˜„๐—ฒ ๐˜€๐˜๐—ถ๐—น๐—น ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„๐—ถ๐—ป๐—ด ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—ฃ๐—ฅ ๐˜๐—ต๐—ฒ ๐˜€๐—ฎ๐—บ๐—ฒ ๐˜„๐—ฎ๐˜†? AI is accelerating software development, but manual approvals remain a bottleneck. I believe the next big shift is ๐—ถ๐—ป๐˜๐—ฒ๐—น๐—น๐—ถ๐—ด๐—ฒ๐—ป๐˜ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ด๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ป๐—ฎ๐—ป๐—ฐ๐—ฒ. This is what makes ๐—ค๐—ผ๐—ฑ๐—ผ'๐˜€ ๐—น๐—ฎ๐˜๐—ฒ๐˜€๐˜ ๐—น๐—ฎ๐˜‚๐—ป๐—ฐ๐—ต interesting: ๐—”๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ฒ๐—ฑ ๐—ฃ๐—ฅ ๐—”๐—ฝ๐—ฝ๐—ฟ๐—ผ๐˜ƒ๐—ฎ๐—น๐˜€: Approve low-risk changes based on engineering policies. ๐—š๐˜‚๐—ฎ๐—ฟ๐—ฑ๐—ฟ๐—ฎ๐—ถ๐—น๐˜€: Keep critical changes under human supervision. ๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—ฆ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—ฅ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„: Understand changes across multiple PRs and repositories. ๐—ฃ๐—ฅ ๐—ง๐—ฟ๐—ถ๐—ฎ๐—ด๐—ฒ: Track approval decisions and their reasoning. ๐—ง๐—ต๐—ฒ ๐—ด๐—ผ๐—ฎ๐—น ๐—ถ๐˜€๐—ป'๐˜ ๐˜๐—ผ ๐—ฟ๐—ฒ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ ๐—ต๐˜‚๐—บ๐—ฎ๐—ป ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„. ๐—œ๐˜'๐˜€ ๐˜๐—ผ ๐—ณ๐—ผ๐—ฐ๐˜‚๐˜€ ๐—ต๐˜‚๐—บ๐—ฎ๐—ป ๐—ท๐˜‚๐—ฑ๐—ด๐—บ๐—ฒ๐—ป๐˜ ๐˜„๐—ต๐—ฒ๐—ฟ๐—ฒ ๐—ถ๐˜ ๐—บ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐˜€ ๐—บ๐—ผ๐˜€๐˜. That's an important step toward a more autonomous software development lifecycle. Thanks @QodoAI for this huge release and the collab on this post. #CodeGovernance #AICodeReview #ad
You can now automate low-risk PR approvals under team rules + review an agentโ€™s related work together in your software factory. New at @QodoAI: Auto Approval Workflows (beta) Agent Session Review (research preview) More intelligent, more deterministic, more governance.
2
44
Aram Tchekrekjian retweeted
๐—–# ๐Ÿญ๐Ÿฑ ๐—ถ๐˜€ ๐—ต๐—ฒ๐—ฟ๐—ฒ, ๐—ฎ๐—ป๐—ฑ ๐—ถ๐˜ ๐—ฏ๐—ฟ๐—ถ๐—ป๐—ด๐˜€ ๐˜€๐—ผ๐—บ๐—ฒ ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฏ๐—ถ๐—ด๐—ด๐—ฒ๐˜€๐˜ ๐—น๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ๐˜€ ๐—ถ๐—ป ๐˜†๐—ฒ๐—ฎ๐—ฟ๐˜€! Released alongside .NET 11, C# 15 introduces powerful features that make our code more expressive, safer, and easier to maintain. Here are the 7 new features every C# developer should know. ๐Ÿญ. ๐—จ๐—ป๐—ถ๐—ผ๐—ป ๐—ง๐˜†๐—ฝ๐—ฒ๐˜€ Represent a value that can be one of several defined types using the new "union" keyword. The compiler also checks that switch expressions handle every possible case. Example: "public union PaymentResult(Success, Failed, Pending);" ๐Ÿฎ. ๐—–๐—น๐—ผ๐˜€๐—ฒ๐—ฑ ๐—›๐—ถ๐—ฒ๐—ฟ๐—ฎ๐—ฟ๐—ฐ๐—ต๐—ถ๐—ฒ๐˜€ Use the new "closed" modifier to restrict inheritance to the declaring assembly. The compiler knows the possible direct descendants and can verify exhaustive pattern matching. Great for modeling controlled state hierarchies. ๐Ÿฏ. ๐—˜๐˜…๐˜๐—ฒ๐—ป๐˜€๐—ถ๐—ผ๐—ป ๐—œ๐—ป๐—ฑ๐—ฒ๐˜…๐—ฒ๐—ฟ๐˜€ Extension members become more powerful! You can now define indexers in extension blocks, allowing types to support indexing syntax without modifying their original implementation. Example: "numbers[2]" on an "IEnumerable<int>" with a custom extension indexer. ๐Ÿฐ. ๐—–๐—ผ๐—น๐—น๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป ๐—˜๐˜…๐—ฝ๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—”๐—ฟ๐—ด๐˜‚๐—บ๐—ฒ๐—ป๐˜๐˜€ Pass constructor or factory arguments directly into collection expressions using "with(...)". Configure capacity, comparers, and other parameters while keeping collection initialization concise. ๐Ÿฑ. ๐—Ÿ๐—ฎ๐—ฏ๐—ฒ๐—น๐—ฒ๐—ฑ ๐—•๐—ฟ๐—ฒ๐—ฎ๐—ธ ๐—ฎ๐—ป๐—ฑ ๐—–๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ฒ Finally, cleaner control flow in nested loops! Use "break outer;" or "continue outer;" to target an enclosing loop directly. No more unnecessary flags or "goto" workarounds. ๐Ÿฒ. ๐—ฆ๐˜๐—ฎ๐˜๐—ถ๐—ฐ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ ๐— ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ๐˜€ Non-virtual static interface members can now work on older runtimes that lack support for default interface implementations. Useful for static helper methods defined directly on interfaces. ๐Ÿณ. ๐— ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜† ๐—ฆ๐—ฎ๐—ณ๐—ฒ๐˜๐˜† (๐—ฃ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„) C# begins a multirelease effort to make unsafe memory operations more explicit. New rules distinguish pointer declarations from operations that actually access unmanaged memory. This improves clarity around memory safety boundaries. ๐— ๐˜† ๐˜๐—ฎ๐—ธ๐—ฒ: Union types and closed hierarchies are the standout additions. They make invalid states harder to represent and give the compiler more opportunities to catch missing cases before production. These are meaningful improvements for domain modeling, API design, and maintainability. ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—–# ๐Ÿญ๐Ÿฑ ๐—ณ๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ ๐—ฎ๐—ฟ๐—ฒ ๐˜†๐—ผ๐˜‚ ๐—บ๐—ผ๐˜€๐˜ ๐—ฒ๐˜…๐—ฐ๐—ถ๐˜๐—ฒ๐—ฑ ๐˜๐—ผ ๐˜‚๐˜€๐—ฒ? --------------------------------------- โ™ป๏ธ Repost if you think this is useful โž• Follow me to @AramT87 to improve your .NET and Architecture skills
1
1
74
๐—–# ๐Ÿญ๐Ÿฑ ๐—ถ๐˜€ ๐—ต๐—ฒ๐—ฟ๐—ฒ, ๐—ฎ๐—ป๐—ฑ ๐—ถ๐˜ ๐—ฏ๐—ฟ๐—ถ๐—ป๐—ด๐˜€ ๐˜€๐—ผ๐—บ๐—ฒ ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฏ๐—ถ๐—ด๐—ด๐—ฒ๐˜€๐˜ ๐—น๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ๐˜€ ๐—ถ๐—ป ๐˜†๐—ฒ๐—ฎ๐—ฟ๐˜€! Released alongside .NET 11, C# 15 introduces powerful features that make our code more expressive, safer, and easier to maintain. Here are the 7 new features every C# developer should know. ๐Ÿญ. ๐—จ๐—ป๐—ถ๐—ผ๐—ป ๐—ง๐˜†๐—ฝ๐—ฒ๐˜€ Represent a value that can be one of several defined types using the new "union" keyword. The compiler also checks that switch expressions handle every possible case. Example: "public union PaymentResult(Success, Failed, Pending);" ๐Ÿฎ. ๐—–๐—น๐—ผ๐˜€๐—ฒ๐—ฑ ๐—›๐—ถ๐—ฒ๐—ฟ๐—ฎ๐—ฟ๐—ฐ๐—ต๐—ถ๐—ฒ๐˜€ Use the new "closed" modifier to restrict inheritance to the declaring assembly. The compiler knows the possible direct descendants and can verify exhaustive pattern matching. Great for modeling controlled state hierarchies. ๐Ÿฏ. ๐—˜๐˜…๐˜๐—ฒ๐—ป๐˜€๐—ถ๐—ผ๐—ป ๐—œ๐—ป๐—ฑ๐—ฒ๐˜…๐—ฒ๐—ฟ๐˜€ Extension members become more powerful! You can now define indexers in extension blocks, allowing types to support indexing syntax without modifying their original implementation. Example: "numbers[2]" on an "IEnumerable<int>" with a custom extension indexer. ๐Ÿฐ. ๐—–๐—ผ๐—น๐—น๐—ฒ๐—ฐ๐˜๐—ถ๐—ผ๐—ป ๐—˜๐˜…๐—ฝ๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—”๐—ฟ๐—ด๐˜‚๐—บ๐—ฒ๐—ป๐˜๐˜€ Pass constructor or factory arguments directly into collection expressions using "with(...)". Configure capacity, comparers, and other parameters while keeping collection initialization concise. ๐Ÿฑ. ๐—Ÿ๐—ฎ๐—ฏ๐—ฒ๐—น๐—ฒ๐—ฑ ๐—•๐—ฟ๐—ฒ๐—ฎ๐—ธ ๐—ฎ๐—ป๐—ฑ ๐—–๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ฒ Finally, cleaner control flow in nested loops! Use "break outer;" or "continue outer;" to target an enclosing loop directly. No more unnecessary flags or "goto" workarounds. ๐Ÿฒ. ๐—ฆ๐˜๐—ฎ๐˜๐—ถ๐—ฐ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ ๐— ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ๐˜€ Non-virtual static interface members can now work on older runtimes that lack support for default interface implementations. Useful for static helper methods defined directly on interfaces. ๐Ÿณ. ๐— ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜† ๐—ฆ๐—ฎ๐—ณ๐—ฒ๐˜๐˜† (๐—ฃ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„) C# begins a multirelease effort to make unsafe memory operations more explicit. New rules distinguish pointer declarations from operations that actually access unmanaged memory. This improves clarity around memory safety boundaries. ๐— ๐˜† ๐˜๐—ฎ๐—ธ๐—ฒ: Union types and closed hierarchies are the standout additions. They make invalid states harder to represent and give the compiler more opportunities to catch missing cases before production. These are meaningful improvements for domain modeling, API design, and maintainability. ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—–# ๐Ÿญ๐Ÿฑ ๐—ณ๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ ๐—ฎ๐—ฟ๐—ฒ ๐˜†๐—ผ๐˜‚ ๐—บ๐—ผ๐˜€๐˜ ๐—ฒ๐˜…๐—ฐ๐—ถ๐˜๐—ฒ๐—ฑ ๐˜๐—ผ ๐˜‚๐˜€๐—ฒ? --------------------------------------- โ™ป๏ธ Repost if you think this is useful โž• Follow me to @AramT87 to improve your .NET and Architecture skills
1
1
74
Aram Tchekrekjian retweeted
๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐—ถ๐˜€ ๐—บ๐—ผ๐—ฟ๐—ฒ ๐˜๐—ต๐—ฎ๐—ป ๐—ฎ ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ ๐˜๐—ผ ๐—ฑ๐—ฒ๐—ฝ๐—น๐—ผ๐˜† ๐—”๐—œ ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€. It's becoming a complete platform for building production-ready AI applications and agents. And if you're a .NET developer or Solution Architect, it's worth understanding what it offers. Here are ๐Ÿณ ๐—ธ๐—ฒ๐˜† ๐—ฐ๐—ฎ๐—ฝ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐—ถ๐—ฒ๐˜€: ๐Ÿญ. ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€ Access thousands of AI models from OpenAI, Microsoft, Anthropic, Meta, and other providers. Compare and select models based on your requirements. ๐Ÿฎ. ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ Build, deploy, and scale AI agents with managed runtime, tool execution, and enterprise integrations. ๐Ÿฏ. ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—™๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ Build code-first agents using C# or Python. Implement workflows, orchestration, and multi-agent systems. ๐Ÿฐ. ๐—ง๐—ผ๐—ผ๐—น๐˜€ & ๐— ๐—–๐—ฃ Connect agents to APIs, enterprise data, custom functions, and MCP servers to perform real business operations. ๐Ÿฑ. ๐—˜๐˜ƒ๐—ฎ๐—น๐˜‚๐—ฎ๐˜๐—ถ๐—ผ๐—ป & ๐—ข๐—ฏ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† Measure groundedness, relevance, task completion, latency, and token usage. Trace agent execution using OpenTelemetry. ๐Ÿฒ. ๐—˜๐—ป๐˜๐—ฒ๐—ฟ๐—ฝ๐—ฟ๐—ถ๐˜€๐—ฒ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† Integrate Microsoft Entra ID, RBAC, content safety, and network isolation to protect AI applications. ๐Ÿณ. ๐—š๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ป๐—ฎ๐—ป๐—ฐ๐—ฒ & ๐— ๐—ผ๐—ป๐—ถ๐˜๐—ผ๐—ฟ๐—ถ๐—ป๐—ด Manage models, agents, and tools with centralized policies, monitoring, and operational controls. ๐— ๐˜† ๐˜๐—ฎ๐—ธ๐—ฒ: Building an AI agent that works in a demo is relatively easy. Building one that is secure, observable, cost-efficient, and reliable in production is a completely different engineering challenge. Microsoft Foundry addresses many of these production concerns in one ecosystem. But managed infrastructure doesn't replace good architecture. You still need authorization boundaries, reliable tool execution, evaluation datasets, and human approval for sensitive actions. ๐—ค๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป: Are you already using Microsoft Foundry for production AI applications, or are you still building directly with model APIs?
1
1
1
214
๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐—ถ๐˜€ ๐—บ๐—ผ๐—ฟ๐—ฒ ๐˜๐—ต๐—ฎ๐—ป ๐—ฎ ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ ๐˜๐—ผ ๐—ฑ๐—ฒ๐—ฝ๐—น๐—ผ๐˜† ๐—”๐—œ ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€. It's becoming a complete platform for building production-ready AI applications and agents. And if you're a .NET developer or Solution Architect, it's worth understanding what it offers. Here are ๐Ÿณ ๐—ธ๐—ฒ๐˜† ๐—ฐ๐—ฎ๐—ฝ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐—ถ๐—ฒ๐˜€: ๐Ÿญ. ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐˜€ Access thousands of AI models from OpenAI, Microsoft, Anthropic, Meta, and other providers. Compare and select models based on your requirements. ๐Ÿฎ. ๐—™๐—ผ๐˜‚๐—ป๐—ฑ๐—ฟ๐˜† ๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ Build, deploy, and scale AI agents with managed runtime, tool execution, and enterprise integrations. ๐Ÿฏ. ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—”๐—ด๐—ฒ๐—ป๐˜ ๐—™๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ Build code-first agents using C# or Python. Implement workflows, orchestration, and multi-agent systems. ๐Ÿฐ. ๐—ง๐—ผ๐—ผ๐—น๐˜€ & ๐— ๐—–๐—ฃ Connect agents to APIs, enterprise data, custom functions, and MCP servers to perform real business operations. ๐Ÿฑ. ๐—˜๐˜ƒ๐—ฎ๐—น๐˜‚๐—ฎ๐˜๐—ถ๐—ผ๐—ป & ๐—ข๐—ฏ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜† Measure groundedness, relevance, task completion, latency, and token usage. Trace agent execution using OpenTelemetry. ๐Ÿฒ. ๐—˜๐—ป๐˜๐—ฒ๐—ฟ๐—ฝ๐—ฟ๐—ถ๐˜€๐—ฒ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† Integrate Microsoft Entra ID, RBAC, content safety, and network isolation to protect AI applications. ๐Ÿณ. ๐—š๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ป๐—ฎ๐—ป๐—ฐ๐—ฒ & ๐— ๐—ผ๐—ป๐—ถ๐˜๐—ผ๐—ฟ๐—ถ๐—ป๐—ด Manage models, agents, and tools with centralized policies, monitoring, and operational controls. ๐— ๐˜† ๐˜๐—ฎ๐—ธ๐—ฒ: Building an AI agent that works in a demo is relatively easy. Building one that is secure, observable, cost-efficient, and reliable in production is a completely different engineering challenge. Microsoft Foundry addresses many of these production concerns in one ecosystem. But managed infrastructure doesn't replace good architecture. You still need authorization boundaries, reliable tool execution, evaluation datasets, and human approval for sensitive actions. ๐—ค๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป: Are you already using Microsoft Foundry for production AI applications, or are you still building directly with model APIs?
1
1
1
214
๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—”๐—ฃ๐—œ ๐˜€๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ป๐—ผ๐˜ ๐˜„๐—ฎ๐—ถ๐˜ ๐—ณ๐—ผ๐—ฟ ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐˜๐—ฎ๐˜€๐—ธ ๐˜๐—ผ ๐—ณ๐—ถ๐—ป๐—ถ๐˜€๐—ต. Sometimes, it only needs to accept the work and process it safely in the background. That is where ๐—–๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ ๐—ถ๐—ป .๐—ก๐—˜๐—ง become useful. โšก A Channel creates a ๐˜๐—ต๐—ฟ๐—ฒ๐—ฎ๐—ฑ ๐˜€๐—ฎ๐—ณ๐—ฒ, ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ๐—ต๐—ฟ๐—ผ๐—ป๐—ผ๐˜‚๐˜€ ๐—ฝ๐—ถ๐—ฝ๐—ฒ๐—น๐—ถ๐—ป๐—ฒ between: - ๐—ฃ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐—ฒ๐—ฟ: Writes work into the channel - ๐—–๐—ผ๐—ป๐˜€๐˜‚๐—บ๐—ฒ๐—ฟ: Reads and processes that work This pattern works well for: ๐Ÿญ. Processing ๐—ฏ๐—ฎ๐—ฐ๐—ธ๐—ด๐—ฟ๐—ผ๐˜‚๐—ป๐—ฑ ๐—ท๐—ผ๐—ฏ๐˜€ ๐Ÿฎ. Buffering ๐—ต๐—ถ๐—ด๐—ต ๐˜๐—ฟ๐—ฎ๐—ณ๐—ณ๐—ถ๐—ฐ ๐—ฒ๐˜ƒ๐—ฒ๐—ป๐˜๐˜€ ๐Ÿฏ. Batching ๐—ฑ๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐—ผ๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐Ÿฐ. Handling ๐—น๐—ผ๐—ด๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—ป๐—ผ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐Ÿฑ. Building ๐—ถ๐—ป ๐—ฝ๐—ฟ๐—ผ๐—ฐ๐—ฒ๐˜€๐˜€ producer consumer workflows Use a ๐—ฏ๐—ผ๐˜‚๐—ป๐—ฑ๐—ฒ๐—ฑ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น to limit its capacity. When the consumer slows down, the channel applies ๐—ฏ๐—ฎ๐—ฐ๐—ธ๐—ฝ๐—ฟ๐—ฒ๐˜€๐˜€๐˜‚๐—ฟ๐—ฒ instead of allowing memory usage to grow without control. Channels are fast and efficient, but they are ๐—ถ๐—ป ๐—ฝ๐—ฟ๐—ผ๐—ฐ๐—ฒ๐˜€๐˜€. If the application restarts, queued items can be lost. For ๐—ฑ๐˜‚๐—ฟ๐—ฎ๐—ฏ๐—น๐—ฒ ๐—ฝ๐—ฟ๐—ผ๐—ฐ๐—ฒ๐˜€๐˜€๐—ถ๐—ป๐—ด across services, use a message broker such as RabbitMQ, Azure Service Bus, or Kafka. ๐—จ๐˜€๐—ฒ ๐—–๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ for fast asynchronous coordination inside one application. ๐—จ๐˜€๐—ฒ ๐—ฎ ๐—บ๐—ฒ๐˜€๐˜€๐—ฎ๐—ด๐—ฒ ๐—ฏ๐—ฟ๐—ผ๐—ธ๐—ฒ๐—ฟ when the work must survive failures or move between services. ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ ๐˜„๐—ผ๐˜‚๐—น๐—ฑ ๐˜†๐—ผ๐˜‚ ๐˜‚๐˜€๐—ฒ ๐—–๐—ต๐—ฎ๐—ป๐—ป๐—ฒ๐—น๐˜€ ๐—ถ๐—ป ๐˜†๐—ผ๐˜‚๐—ฟ .๐—ก๐—˜๐—ง ๐—ฎ๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป?
1
1
39
๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐—ฎ๐—ป๐—ฑ ๐—–# ๐Ÿญ๐Ÿฑ ๐—ฎ๐—ฟ๐—ฒ ๐—ต๐—ฒ๐—ฟ๐—ฒ! ๐Ÿ”ฅ And this release brings major improvements across the .NET ecosystem. From Union Types and Runtime Async to new APIs, better performance, and powerful EF Core capabilities. Here are the ๐—ธ๐—ฒ๐˜† ๐˜‚๐—ฝ๐—ฑ๐—ฎ๐˜๐—ฒ๐˜€ ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐˜† .๐—ก๐—˜๐—ง ๐—ฑ๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐˜€๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ธ๐—ป๐—ผ๐˜„: ๐Ÿ‘‡ ๐Ÿญ. ๐—–# ๐Ÿญ๐Ÿฑ โ–ช๏ธ Union Types: Model multiple possible types with exhaustive switch checking. โ–ช๏ธ Closed Hierarchies: Restrict inheritance to the declaring assembly. โ–ช๏ธ Collection Expressions: Support constructor arguments using with(...). โ–ช๏ธ Extension Indexers: Add indexers to existing types. โ–ช๏ธ Labeled Break/Continue: Control enclosing loops. โ–ช๏ธ Memory Safety (Preview): Improved safety for unmanaged memory. ๐Ÿฎ. ๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐—ฅ๐˜‚๐—ป๐˜๐—ถ๐—บ๐—ฒ โ–ช๏ธ Runtime Async (Preview): Reduced async overhead and cleaner stack traces. โ–ช๏ธ JIT Optimizations: Better de-virtualization and bounds-check elimination. โ–ช๏ธ Native AOT: Faster interface dispatch. โ–ช๏ธ Diagnostics: In-process crash reports. ๐Ÿฏ. ๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐—Ÿ๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐—ถ๐—ฒ๐˜€ โ–ช๏ธ LINQ: New FullJoin and tuple-returning join overloads. โ–ช๏ธ JSON: JSON Lines and union serialization. โ–ช๏ธ Compression: Zstandard support. โ–ช๏ธ Numeric Types: Decimal32, Decimal64, and Decimal128. โ–ช๏ธ Validation: New asynchronous validation APIs. ๐Ÿฐ. ๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐—ฆ๐——๐—ž & ๐—ง๐—ผ๐—ผ๐—น๐—ถ๐—ป๐—ด โ–ช๏ธ File-Based Apps: Multi-file support with #:include. โ–ช๏ธ dotnet test: Improved execution and reporting. โ–ช๏ธ dotnet watch: Automatic crash recovery. โ–ช๏ธ Native AOT CLI: Faster CLI startup. ๐Ÿฑ. ๐—”๐—ฆ๐—ฃ .๐—ก๐—˜๐—ง ๐—–๐—ผ๐—ฟ๐—ฒ ๐Ÿญ๐Ÿญ โ–ช๏ธ Async Validation: Asynchronous validators in Minimal APIs. โ–ช๏ธ Localization: Built-in validation localization. โ–ช๏ธ OpenAPI 3.2: Default support with SSE schemas. โ–ช๏ธ MCP: New MCP server project template. โ–ช๏ธ HTTP/3: Reduced initial request latency. ๐Ÿฒ. ๐—˜๐—™ ๐—–๐—ผ๐—ฟ๐—ฒ ๐Ÿญ๐Ÿญ โ–ช๏ธ Query Performance: More efficient SQL generation. โ–ช๏ธ FullJoin: Translation to SQL FULL JOIN. โ–ช๏ธ MaxBy/MinBy: SQL translation support. โ–ช๏ธ Vector Search (Experimental): Vector indexes and similarity search. โ–ช๏ธ Hybrid Search: Combine vector and full-text search. โ–ช๏ธ Vector Loading: Avoid loading vector columns by default. ๐— ๐˜† ๐˜๐—ฎ๐—ธ๐—ฒ? Union Types are a significant addition to C#, particularly for modeling application states and operation results. Runtime Async is promising for high-throughput applications, although it remains experimental. And EF Core's vector search capabilities are particularly interesting for building AI-powered applications on SQL Server. If you're already on .NET 10 LTS, there's no immediate reason to upgrade production systems. But .NET 11 is definitely worth exploring! ๐—ช๐—ต๐—ถ๐—ฐ๐—ต .๐—ก๐—˜๐—ง ๐Ÿญ๐Ÿญ ๐—ณ๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ ๐—ฒ๐˜…๐—ฐ๐—ถ๐˜๐—ฒ๐˜€ ๐˜†๐—ผ๐˜‚ ๐˜๐—ต๐—ฒ ๐—บ๐—ผ๐˜€๐˜?
1
2
120
Aram Tchekrekjian retweeted
โšก๐—Ÿ๐—œ๐—ก๐—ค ๐— ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐˜€ ๐—˜๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—–# ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ž๐—ป๐—ผ๐˜„ LINQ makes C# code cleaner, shorter, and easier to maintain. Here are ๐Ÿญ๐Ÿฎ ๐—บ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐˜€ ๐˜„๐—ผ๐—ฟ๐˜๐—ต ๐—บ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด: ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ() โ€“ Filters elements based on a condition. ๐—ฆ๐—ฒ๐—น๐—ฒ๐—ฐ๐˜() โ€“ Transforms elements into a new shape. ๐—ฆ๐—ฒ๐—น๐—ฒ๐—ฐ๐˜๐— ๐—ฎ๐—ป๐˜†() โ€“ Flattens nested collections. ๐—”๐—ป๐˜†() โ€“ Checks if at least one element matches. ๐—”๐—น๐—น() โ€“ Checks if every element matches. ๐——๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ฐ๐˜๐—•๐˜†() โ€“ Removes duplicates based on a key. ๐—š๐—ฟ๐—ผ๐˜‚๐—ฝ๐—•๐˜†() โ€“ Groups elements by a common key. ๐—ข๐—ฟ๐—ฑ๐—ฒ๐—ฟ๐—•๐˜†() โ€“ Sorts elements in ascending order. ๐—™๐—ถ๐—ฟ๐˜€๐˜๐—ข๐—ฟ๐——๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜() โ€“ Returns the first match or a default value. ๐— ๐—ฎ๐˜…๐—•๐˜†() โ€“ Finds the element with the highest key. ๐—–๐—ต๐˜‚๐—ป๐—ธ() โ€“ Splits a collection into batches. ๐—”๐—ด๐—ด๐—ฟ๐—ฒ๐—ด๐—ฎ๐˜๐—ฒ() โ€“ Combines elements into a single result. LINQ queries often use deferred execution. Understand when your query actually runs, especially with EF Core. Which LINQ method do you find yourself using most often?
2
3
113
โšก๐—Ÿ๐—œ๐—ก๐—ค ๐— ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐˜€ ๐—˜๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—–# ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ž๐—ป๐—ผ๐˜„ LINQ makes C# code cleaner, shorter, and easier to maintain. Here are ๐Ÿญ๐Ÿฎ ๐—บ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ๐˜€ ๐˜„๐—ผ๐—ฟ๐˜๐—ต ๐—บ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด: ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ() โ€“ Filters elements based on a condition. ๐—ฆ๐—ฒ๐—น๐—ฒ๐—ฐ๐˜() โ€“ Transforms elements into a new shape. ๐—ฆ๐—ฒ๐—น๐—ฒ๐—ฐ๐˜๐— ๐—ฎ๐—ป๐˜†() โ€“ Flattens nested collections. ๐—”๐—ป๐˜†() โ€“ Checks if at least one element matches. ๐—”๐—น๐—น() โ€“ Checks if every element matches. ๐——๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ฐ๐˜๐—•๐˜†() โ€“ Removes duplicates based on a key. ๐—š๐—ฟ๐—ผ๐˜‚๐—ฝ๐—•๐˜†() โ€“ Groups elements by a common key. ๐—ข๐—ฟ๐—ฑ๐—ฒ๐—ฟ๐—•๐˜†() โ€“ Sorts elements in ascending order. ๐—™๐—ถ๐—ฟ๐˜€๐˜๐—ข๐—ฟ๐——๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜() โ€“ Returns the first match or a default value. ๐— ๐—ฎ๐˜…๐—•๐˜†() โ€“ Finds the element with the highest key. ๐—–๐—ต๐˜‚๐—ป๐—ธ() โ€“ Splits a collection into batches. ๐—”๐—ด๐—ด๐—ฟ๐—ฒ๐—ด๐—ฎ๐˜๐—ฒ() โ€“ Combines elements into a single result. LINQ queries often use deferred execution. Understand when your query actually runs, especially with EF Core. Which LINQ method do you find yourself using most often?
2
3
113
Task.WhenAll ๐˜ƒ๐˜€ Parallel.ForEachAsync ๐—ถ๐—ป .๐—ก๐—˜๐—ง: ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—ข๐—ป๐—ฒ ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ฌ๐—ผ๐˜‚ ๐—จ๐˜€๐—ฒ? Both support running independent operations concurrently, but they differ in how they manage concurrency and resources. The right choice depends on your workload. ๐Ÿญ. Task.WhenAll Best for a known set of independent asynchronous operations, especially I/O-bound tasks. ๐˜ท๐˜ข๐˜ณ ๐˜ถ๐˜ด๐˜ฆ๐˜ณ๐˜ด๐˜›๐˜ข๐˜ด๐˜ฌ = ๐˜Ž๐˜ฆ๐˜ต๐˜œ๐˜ด๐˜ฆ๐˜ณ๐˜ด๐˜ˆ๐˜ด๐˜บ๐˜ฏ๐˜ค(); ๐˜ท๐˜ข๐˜ณ ๐˜ฐ๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ๐˜ด๐˜›๐˜ข๐˜ด๐˜ฌ = ๐˜Ž๐˜ฆ๐˜ต๐˜–๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ๐˜ด๐˜ˆ๐˜ด๐˜บ๐˜ฏ๐˜ค(); ๐˜ข๐˜ธ๐˜ข๐˜ช๐˜ต Task.WhenAll(usersTask, ๐˜ฐ๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ๐˜ด๐˜›๐˜ข๐˜ด๐˜ฌ); โ€ข Ideal for multiple independent API or database calls. โ€ข No built-in concurrency limit. โ€ข Doesn't automatically create threads. ๐Ÿฎ. Parallel.ForEachAsync Best for processing collections with controlled concurrency. ๐˜ข๐˜ธ๐˜ข๐˜ช๐˜ต Parallel.ForEachAsync( ๐˜ฐ๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ๐˜ด, ๐˜ฏ๐˜ฆ๐˜ธ ๐˜—๐˜ข๐˜ณ๐˜ข๐˜ญ๐˜ญ๐˜ฆ๐˜ญ๐˜–๐˜ฑ๐˜ต๐˜ช๐˜ฐ๐˜ฏ๐˜ด { ๐˜”๐˜ข๐˜น๐˜‹๐˜ฆ๐˜จ๐˜ณ๐˜ฆ๐˜ฆ๐˜–๐˜ง๐˜—๐˜ข๐˜ณ๐˜ข๐˜ญ๐˜ญ๐˜ฆ๐˜ญ๐˜ช๐˜ด๐˜ฎ = 10 }, ๐˜ข๐˜ด๐˜บ๐˜ฏ๐˜ค (๐˜ฐ๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ, ๐˜ค๐˜ต) => ๐˜ข๐˜ธ๐˜ข๐˜ช๐˜ต ๐˜—๐˜ณ๐˜ฐ๐˜ค๐˜ฆ๐˜ด๐˜ด๐˜–๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ๐˜ˆ๐˜ด๐˜บ๐˜ฏ๐˜ค(๐˜ฐ๐˜ณ๐˜ฅ๐˜ฆ๐˜ณ, ๐˜ค๐˜ต)); โ€ข Supports I/O-bound and CPU-bound workloads. โ€ข Built-in concurrency control. โ€ข Useful for large collections and external API calls. ๐Ÿฏ. ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—ข๐—ป๐—ฒ ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ฌ๐—ผ๐˜‚ ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ? CPU-bound: Prefer Parallel.ForEach for synchronous CPU-intensive operations. I/O-bound: Use Task.WhenAll for a few independent operations, or Parallel.ForEachAsync when concurrency limits are needed. External APIs: Both work, but Parallel.ForEachAsync is often better for processing hundreds of requests without overwhelming downstream services. ๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฎ๐—ป๐˜ ๐—˜๐—™ ๐—–๐—ผ๐—ฟ๐—ฒ ๐—ฅ๐—ฒ๐—บ๐—ถ๐—ป๐—ฑ๐—ฒ๐—ฟ DbContext is not thread-safe. Never execute concurrent queries using the same instance. Use separate instances or run queries sequentially. ๐—ž๐—ฒ๐˜† ๐—ง๐—ฎ๐—ธ๐—ฒ๐—ฎ๐˜„๐—ฎ๐˜† Task.WhenAll awaits multiple tasks without built-in concurrency limits. Parallel.ForEachAsync processes collections with bounded concurrency. And remember, Parallel.ForEachAsync defaults to Environment.ProcessorCount concurrent operations, so configure MaxDegreeOfParallelism for your workload. ๐—ช๐—ต๐—ถ๐—ฐ๐—ต ๐—ผ๐—ป๐—ฒ ๐—ฑ๐—ผ ๐˜†๐—ผ๐˜‚ ๐˜‚๐˜€๐—ฒ ๐—บ๐—ผ๐—ฟ๐—ฒ ๐—ผ๐—ณ๐˜๐—ฒ๐—ป ๐—ถ๐—ป ๐—ฝ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜๐—ถ๐—ผ๐—ป .๐—ก๐—˜๐—ง ๐—ฎ๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€? #dotnet #csharp #aspnetdotnetcore #async #Microsoft
1
2
69
Aram Tchekrekjian retweeted
โšก๏ธ๐Ÿณ ๐—”๐˜€๐˜†๐—ป๐—ฐ/๐—”๐˜„๐—ฎ๐—ถ๐˜ ๐— ๐—ถ๐˜€๐˜๐—ฎ๐—ธ๐—ฒ๐˜€ ๐—˜๐˜ƒ๐—ฒ๐—ป ๐—ฆ๐—ฒ๐—ป๐—ถ๐—ผ๐—ฟ .๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€ ๐— ๐—ฎ๐—ธ๐—ฒ After working on production .NET applications for years, I've learned one thing: Writing async code is easy. Writing async code that behaves correctly under load is a different story. Here are 7 mistakes worth avoiding: ๐Ÿญ. ๐—•๐—น๐—ผ๐—ฐ๐—ธ๐—ถ๐—ป๐—ด ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐—–๐—ผ๐—ฑ๐—ฒ ๐˜„๐—ถ๐˜๐—ต .๐—ฅ๐—ฒ๐˜€๐˜‚๐—น๐˜ ๐—ผ๐—ฟ .๐—ช๐—ฎ๐—ถ๐˜() Calling .Result or .Wait() blocks the current thread while waiting for an asynchronous operation. In ASP .NET Core, this can cause thread pool starvation and reduce throughput. Better: Use await throughout the call chain. ๐Ÿฎ. ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ ๐˜ƒ๐—ผ๐—ถ๐—ฑ ๐—œ๐—ป๐˜€๐˜๐—ฒ๐—ฎ๐—ฑ ๐—ผ๐—ณ ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ ๐—ง๐—ฎ๐˜€๐—ธ An async void method cannot be awaited, and its exceptions cannot be handled by the caller through normal Task-based exception handling. Better: Return Task or Task<T>. Reserve async void for event handlers that require it. ๐Ÿฏ. ๐—™๐—ผ๐—ฟ๐—ด๐—ฒ๐˜๐˜๐—ถ๐—ป๐—ด ๐˜๐—ผ ๐—”๐˜„๐—ฎ๐—ถ๐˜ ๐—ฎ๐—ป ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐—ข๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป Calling an async method without awaiting or tracking its returned Task can lead to lost exceptions and operations continuing beyond the intended scope. Better: Await the operation or explicitly manage its lifetime. ๐Ÿฐ. ๐—ฅ๐˜‚๐—ป๐—ป๐—ถ๐—ป๐—ด ๐—œ๐—ป๐—ฑ๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐˜ ๐—ข๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ฆ๐—ฒ๐—พ๐˜‚๐—ฒ๐—ป๐˜๐—ถ๐—ฎ๐—น๐—น๐˜† Consider two independent API calls: The second call starts only after the first completes. Better: Start both operations and await them together. Use this when operations are independent and safe to run concurrently. ๐Ÿฑ. ๐—œ๐—ด๐—ป๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐—–๐—ฎ๐—ป๐—ฐ๐—ฒ๐—น๐—น๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐—ง๐—ผ๐—ธ๐—ฒ๐—ป Without cancellation propagation, expensive database queries or HTTP requests may continue even after the client disconnects. Better: Accept and propagate CancellationToken through your async call chain. ๐Ÿฒ. ๐—”๐˜€๐˜€๐˜‚๐—บ๐—ถ๐—ป๐—ด ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐— ๐—ฒ๐—ฎ๐—ป๐˜€ ๐—ฃ๐—ฎ๐—ฟ๐—ฎ๐—น๐—น๐—ฒ๐—น async/await does not automatically create new threads or make CPU-intensive work faster. Async is primarily about non-blocking waiting. Better: Use async for I/O-bound operations. Consider Task.Run for appropriate CPU-bound work outside latency-sensitive server request paths. ๐Ÿณ. ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—ง๐—ฎ๐˜€๐—ธ.๐—ช๐—ต๐—ฒ๐—ป๐—”๐—น๐—น ๐—ช๐—ถ๐˜๐—ต๐—ผ๐˜‚๐˜ ๐—–๐—ผ๐—ป๐˜๐—ฟ๐—ผ๐—น๐—น๐—ถ๐—ป๐—ด ๐—–๐—ผ๐—ป๐—ฐ๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐—ฐ๐˜† Launching thousands of database queries or HTTP requests simultaneously can exhaust connection pools, overwhelm downstream services, and increase latency. Better: Apply bounded concurrency using SemaphoreSlim, Parallel.ForEachAsync, or another suitable concurrency limiter. Async/await is not just about improving performance. It's about managing resources, concurrency, cancellation, and failures correctly. A method can be asynchronous and still make your application slower, less reliable, or harder to debug. Which async/await mistake have you encountered most often in production?
2
2
76
โšก๏ธ๐Ÿณ ๐—”๐˜€๐˜†๐—ป๐—ฐ/๐—”๐˜„๐—ฎ๐—ถ๐˜ ๐— ๐—ถ๐˜€๐˜๐—ฎ๐—ธ๐—ฒ๐˜€ ๐—˜๐˜ƒ๐—ฒ๐—ป ๐—ฆ๐—ฒ๐—ป๐—ถ๐—ผ๐—ฟ .๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€ ๐— ๐—ฎ๐—ธ๐—ฒ After working on production .NET applications for years, I've learned one thing: Writing async code is easy. Writing async code that behaves correctly under load is a different story. Here are 7 mistakes worth avoiding: ๐Ÿญ. ๐—•๐—น๐—ผ๐—ฐ๐—ธ๐—ถ๐—ป๐—ด ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐—–๐—ผ๐—ฑ๐—ฒ ๐˜„๐—ถ๐˜๐—ต .๐—ฅ๐—ฒ๐˜€๐˜‚๐—น๐˜ ๐—ผ๐—ฟ .๐—ช๐—ฎ๐—ถ๐˜() Calling .Result or .Wait() blocks the current thread while waiting for an asynchronous operation. In ASP .NET Core, this can cause thread pool starvation and reduce throughput. Better: Use await throughout the call chain. ๐Ÿฎ. ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ ๐˜ƒ๐—ผ๐—ถ๐—ฑ ๐—œ๐—ป๐˜€๐˜๐—ฒ๐—ฎ๐—ฑ ๐—ผ๐—ณ ๐—ฎ๐˜€๐˜†๐—ป๐—ฐ ๐—ง๐—ฎ๐˜€๐—ธ An async void method cannot be awaited, and its exceptions cannot be handled by the caller through normal Task-based exception handling. Better: Return Task or Task<T>. Reserve async void for event handlers that require it. ๐Ÿฏ. ๐—™๐—ผ๐—ฟ๐—ด๐—ฒ๐˜๐˜๐—ถ๐—ป๐—ด ๐˜๐—ผ ๐—”๐˜„๐—ฎ๐—ถ๐˜ ๐—ฎ๐—ป ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐—ข๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป Calling an async method without awaiting or tracking its returned Task can lead to lost exceptions and operations continuing beyond the intended scope. Better: Await the operation or explicitly manage its lifetime. ๐Ÿฐ. ๐—ฅ๐˜‚๐—ป๐—ป๐—ถ๐—ป๐—ด ๐—œ๐—ป๐—ฑ๐—ฒ๐—ฝ๐—ฒ๐—ป๐—ฑ๐—ฒ๐—ป๐˜ ๐—ข๐—ฝ๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ฆ๐—ฒ๐—พ๐˜‚๐—ฒ๐—ป๐˜๐—ถ๐—ฎ๐—น๐—น๐˜† Consider two independent API calls: The second call starts only after the first completes. Better: Start both operations and await them together. Use this when operations are independent and safe to run concurrently. ๐Ÿฑ. ๐—œ๐—ด๐—ป๐—ผ๐—ฟ๐—ถ๐—ป๐—ด ๐—–๐—ฎ๐—ป๐—ฐ๐—ฒ๐—น๐—น๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐—ง๐—ผ๐—ธ๐—ฒ๐—ป Without cancellation propagation, expensive database queries or HTTP requests may continue even after the client disconnects. Better: Accept and propagate CancellationToken through your async call chain. ๐Ÿฒ. ๐—”๐˜€๐˜€๐˜‚๐—บ๐—ถ๐—ป๐—ด ๐—”๐˜€๐˜†๐—ป๐—ฐ ๐— ๐—ฒ๐—ฎ๐—ป๐˜€ ๐—ฃ๐—ฎ๐—ฟ๐—ฎ๐—น๐—น๐—ฒ๐—น async/await does not automatically create new threads or make CPU-intensive work faster. Async is primarily about non-blocking waiting. Better: Use async for I/O-bound operations. Consider Task.Run for appropriate CPU-bound work outside latency-sensitive server request paths. ๐Ÿณ. ๐—จ๐˜€๐—ถ๐—ป๐—ด ๐—ง๐—ฎ๐˜€๐—ธ.๐—ช๐—ต๐—ฒ๐—ป๐—”๐—น๐—น ๐—ช๐—ถ๐˜๐—ต๐—ผ๐˜‚๐˜ ๐—–๐—ผ๐—ป๐˜๐—ฟ๐—ผ๐—น๐—น๐—ถ๐—ป๐—ด ๐—–๐—ผ๐—ป๐—ฐ๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐—ฐ๐˜† Launching thousands of database queries or HTTP requests simultaneously can exhaust connection pools, overwhelm downstream services, and increase latency. Better: Apply bounded concurrency using SemaphoreSlim, Parallel.ForEachAsync, or another suitable concurrency limiter. Async/await is not just about improving performance. It's about managing resources, concurrency, cancellation, and failures correctly. A method can be asynchronous and still make your application slower, less reliable, or harder to debug. Which async/await mistake have you encountered most often in production?
2
2
76
Aram Tchekrekjian retweeted
Security vulnerabilities don't always exist within a single repository. In modern distributed systems, especially microservices, a vulnerability can span multiple services, repositories, and trust boundaries. CodeRabbit just introduced some interesting enhancements to ๐—–๐—ผ๐—ฑ๐—ฒ๐—ฅ๐—ฎ๐—ฏ๐—ฏ๐—ถ๐˜ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ. ๐Ÿ”ฅ Here's what caught my attention: - Cross-Repository Deep Scan: Analyzes connected repositories to identify security risks across services and shared libraries. - Runtime Verification: Attempts to reproduce vulnerabilities in isolated sandboxes, helping distinguish exploitable issues from theoretical risks. - Delta Scans: Rechecks changed code and affected areas without repeatedly scanning the entire repository. - Security Checks: Can block pull request merges until critical vulnerabilities are verified as fixed. - Security Visibility: Provides organization-wide reporting and integrates findings with Jira and Linear. My key takeaway: Security analysis needs architectural context, not just code-level inspection. A service might appear secure in isolation, while vulnerabilities emerge from interactions between services, authorization boundaries, and shared components. I particularly like the combination of cross-repository analysis and runtime verification. It brings security findings closer to actual exploitability. This is a promising direction for AI-assisted application security. What do you think? Should cross-repository security analysis become a standard part of modern CI/CD pipelines? ๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฎ๐—ป๐˜: ๐—–๐—ผ๐—ฑ๐—ฒ๐—ฅ๐—ฎ๐—ฏ๐—ฏ๐—ถ๐˜ ๐—ถ๐˜€ ๐—ฝ๐˜‚๐˜๐˜๐—ถ๐—ป๐—ด $๐Ÿญ๐—  ๐—ถ๐—ป ๐—ณ๐—ฟ๐—ฒ๐—ฒ ๐——๐—ฒ๐—ฒ๐—ฝ ๐—ฆ๐—ฐ๐—ฎ๐—ป๐˜€ ๐˜‚๐—ป๐˜๐—ถ๐—น ๐—ก๐—ผ๐˜ƒ๐—ฒ๐—บ๐—ฏ๐—ฒ๐—ฟ ๐Ÿด. ๐—ง๐—ต๐—ถ๐˜€ ๐—ถ๐—ป๐—ฐ๐—น๐˜‚๐—ฑ๐—ฒ๐˜€ ๐—ผ๐—ฝ๐—ฒ๐—ป-๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ ๐—บ๐—ฎ๐—ถ๐—ป๐˜๐—ฎ๐—ถ๐—ป๐—ฒ๐—ฟ๐˜€ ๐—ฎ๐—ป๐—ฑ ๐˜๐—ฒ๐—ฎ๐—บ๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ต๐—ฎ๐˜ƒ๐—ฒ ๐—ป๐—ฒ๐˜ƒ๐—ฒ๐—ฟ ๐˜‚๐˜€๐—ฒ๐—ฑ ๐—–๐—ผ๐—ฑ๐—ฒ๐—ฅ๐—ฎ๐—ฏ๐—ฏ๐—ถ๐˜. ๐—œ๐˜โ€™๐˜€ ๐—ณ๐—ถ๐—ฟ๐˜€๐˜ ๐—ฐ๐—ผ๐—บ๐—ฒ, ๐—ณ๐—ถ๐—ฟ๐˜€๐˜ ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฒ๐—ฑ.
New in CodeRabbit Secure: Deep Scan now follows a vulnerability across your linked repos, then replays the exploit in a throwaway sandbox to prove it's real before it flags anything. Hendrik walks through this and everything else in the new update:
2
1
4
211
Aram Tchekrekjian retweeted
๐—”๐—œ ๐—ฐ๐—ฎ๐—ป ๐—ด๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ฎ๐˜๐—ฒ ๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ฒ๐—ฐ๐˜๐—น๐˜† ๐˜ƒ๐—ฎ๐—น๐—ถ๐—ฑ ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐˜€๐˜๐—ถ๐—น๐—น ๐—ฝ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐—ฒ ๐—ฎ ๐—ณ๐˜‚๐—ป๐—ฑ๐—ฎ๐—บ๐—ฒ๐—ป๐˜๐—ฎ๐—น๐—น๐˜† ๐˜„๐—ฟ๐—ผ๐—ป๐—ด ๐—ฑ๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐—บ๐—ผ๐—ฑ๐—ฒ๐—น. That's because Domain-Driven Design (DDD) isn't just about writing code. It's about understanding business complexity, defining clear boundaries, and ensuring the right business decisions belong to the right domains. I recently explored ๐—”๐—œ-๐—”๐˜‚๐—ด๐—บ๐—ฒ๐—ป๐˜๐—ฒ๐—ฑ ๐——๐—ผ๐—บ๐—ฎ๐—ถ๐—ป-๐——๐—ฟ๐—ถ๐˜ƒ๐—ฒ๐—ป ๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป by @aacerbis and @collaalessandro, published by Packt. ๐Ÿ”ฅ What makes this book interesting is how it combines DDD principles with LLMs and AI agents while keeping architectural judgment and domain expertise at the center. The book covers three major areas: ๐Ÿญ. ๐—”๐—œ ๐—ฎ๐˜€ ๐—ฎ ๐—ฅ๐—ฒ๐—ฎ๐˜€๐—ผ๐—ป๐—ถ๐—ป๐—ด ๐—ฃ๐—ฎ๐—ฟ๐˜๐—ป๐—ฒ๐—ฟ โ€ข Understanding how LLMs work, including their limitations and reasoning capabilities. โ€ข Using precise language, structured prompts, and domain constraints to improve AI-assisted modeling. โ€ข Treating AI as a collaborator rather than an architectural decision-maker. ๐Ÿฎ. ๐—”๐—œ-๐—”๐˜€๐˜€๐—ถ๐˜€๐˜๐—ฒ๐—ฑ ๐——๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐— ๐—ผ๐—ฑ๐—ฒ๐—น๐—ถ๐—ป๐—ด โ€ข Applying EventStorming and Domain Storytelling with AI. โ€ข Refining bounded contexts, aggregates, commands, and domain events. โ€ข Building reusable prompt rulebooks to enforce DDD principles. โ€ข Using Domain Carriers to preserve business knowledge, terminology, and architectural decisions. ๐Ÿฏ. ๐—™๐—ฟ๐—ผ๐—บ ๐—ฃ๐—ฟ๐—ผ๐—บ๐—ฝ๐˜๐˜€ ๐˜๐—ผ ๐—š๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ป๐—ฒ๐—ฑ ๐—”๐—œ ๐—”๐—ด๐—ฒ๐—ป๐˜๐˜€ โ€ข Designing specialized agents for EventStorming, storytelling, and context mapping. โ€ข Coordinating agents through an Orchestrator with structured workflows and human approval gates. โ€ข Managing agent autonomy, semantic disagreements, and architectural constraints. ๐—ช๐—ต๐—ฎ๐˜ ๐—œ ๐—ฝ๐—ฎ๐—ฟ๐˜๐—ถ๐—ฐ๐˜‚๐—น๐—ฎ๐—ฟ๐—น๐˜† ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ฒ๐—ฐ๐—ถ๐—ฎ๐˜๐—ฒ ๐—ถ๐˜€ ๐˜๐—ต๐—ฒ ๐—ฝ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฎ๐—น ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต. Through the BrewUp brewery domain, the authors demonstrate how AI can support iterative domain modeling while respecting bounded-context boundaries and business ownership. For example, an AI might generate working code that mixes payment authorization, stock reservation, and order confirmation inside one aggregate. Technically valid? Possibly. Architecturally correct? Not necessarily. ๐Ÿ’ก My biggest takeaway: AI should accelerate domain understanding, not replace domain expertise. I'd recommend this book to software architects, senior developers, and technical leaders who want to apply LLMs and agentic AI to complex enterprise systems without compromising DDD principles. Discover how LLMs, Domain-Driven Design, and specialized AI agents can work together to model complex business systems. ๐Ÿ‘‰ Get your copy here: lnkd.in/dhy6d7Dk ๐—ช๐—ผ๐˜‚๐—น๐—ฑ ๐˜†๐—ผ๐˜‚ ๐˜๐—ฟ๐˜‚๐˜€๐˜ ๐—”๐—œ ๐—ฎ๐—ด๐—ฒ๐—ป๐˜๐˜€ ๐˜๐—ผ ๐—ต๐—ฒ๐—น๐—ฝ ๐—ถ๐—ฑ๐—ฒ๐—ป๐˜๐—ถ๐—ณ๐˜† ๐—ฏ๐—ผ๐˜‚๐—ป๐—ฑ๐—ฒ๐—ฑ ๐—ฐ๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜๐˜€ ๐—ถ๐—ป ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ป๐—ฒ๐˜…๐˜ ๐—ฝ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜? P.S. Thanks @PacktPublishing for the collab on this post, and shoutout for the great authors @aacerbis and @collaalessandro
5
1
6
200