Skip to content

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access

Tag: Zero Reflection

C#

C#: Use Source Generators to Generate Boilerplate Code at Compile Time

- 03.02.26 - ErcanOPAK comment on C#: Use Source Generators to Generate Boilerplate Code at Compile Time

Writing repetitive mapping code, serialization logic, or validators? Source Generators create code at compile time, eliminating runtime reflection overhead. What Are Source Generators: // You write this: [GenerateToString] public partial class Person { public string Name { get; set; } public int Age { get; set; } } // Source Generator automatically creates this at […]

Read More
February 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
232425262728  
« Jan    

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (934)
  • How to add default value for Entity Framework migrations for DateTime and Bool (830)
  • Get the First and Last Word from a String or Sentence in SQL (822)
  • How to select distinct rows in a datatable in C# (799)
  • How to make theater mode the default for Youtube (708)
  • Add Constraint to SQL Table to ensure email contains @ (571)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (552)
  • Average of all values in a column that are not zero in SQL (517)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (473)
  • Find numbers with more than two decimal places in SQL (436)

Recent Posts

  • CSS: Use aspect-ratio Property Instead of Padding Hack
  • Windows 11: Snap Windows into Layouts with One Click
  • Windows 11: Never Lose Clipboard History Again with Built-in Manager
  • AI Prompt: Generate Realistic Test Data for Development
  • AI Prompt: Simplify Legal Documents into Plain English
  • AI Prompt: Turn Meeting Notes into Actionable Task Lists
  • Docker: Use docker compose watch to Auto-Rebuild on File Changes
  • Kubernetes: View Real-Time Pod Logs with Stern Instead of kubectl
  • WordPress: Enable Maintenance Mode Without Plugins Using One Line of Code
  • WordPress: Add Custom Code Without Editing Theme Files Using Code Snippets Plugin

Most Viewed Posts

  • Get the User Name and Domain Name from an Email Address in SQL (934)
  • How to add default value for Entity Framework migrations for DateTime and Bool (830)
  • Get the First and Last Word from a String or Sentence in SQL (822)
  • How to select distinct rows in a datatable in C# (799)
  • How to make theater mode the default for Youtube (708)

Recent Posts

  • CSS: Use aspect-ratio Property Instead of Padding Hack
  • Windows 11: Snap Windows into Layouts with One Click
  • Windows 11: Never Lose Clipboard History Again with Built-in Manager
  • AI Prompt: Generate Realistic Test Data for Development
  • AI Prompt: Simplify Legal Documents into Plain English

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com