<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Leo Smith</title>
    <description>The latest articles on DEV Community by Leo Smith (@leo_smith).</description>
    <link>https://dev.to/leo_smith</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2919757%2Fd9046be2-5403-4393-9430-8d1825d1a376.jpg</url>
      <title>DEV Community: Leo Smith</title>
      <link>https://dev.to/leo_smith</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leo_smith"/>
    <language>en</language>
    <item>
      <title>Why Use a Code Generator to Speed Up C# Web API Development Instead of AI?</title>
      <dc:creator>Leo Smith</dc:creator>
      <pubDate>Wed, 19 Mar 2025 06:53:35 +0000</pubDate>
      <link>https://dev.to/leo_smith/why-use-a-code-generator-to-speed-up-c-web-api-development-instead-of-ai-4ogk</link>
      <guid>https://dev.to/leo_smith/why-use-a-code-generator-to-speed-up-c-web-api-development-instead-of-ai-4ogk</guid>
      <description>&lt;p&gt;Let's be real! Building a C# Web API from scratch can be a grind. You're dealing with controllers, repositories, services, and Entity Framework (EF) configurations. Sure, AI tools promise to generate code for you, but have you ever tried fixing AI-generated code? It's like getting a messy room cleaned up by a toddler. Sometimes it works, but most of the time, you're just cleaning up a different kind of mess.&lt;/p&gt;

&lt;p&gt;That's why code generators still have a solid place in modern development. They're predictable, and efficient, and save you from reinventing the wheel every time you start a new project. Let's talk about why a good code generator, like EF Core Sidekick, is a smarter choice over AI when you're trying to speed up your development without sacrificing sanity.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;1. You Know What You're Getting&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;With a code generator, you're in control. You define the rules, the templates, and the structure of your code. That means it'll always align with best practices for C#, RESTful APIs, and EF Core. AI, on the other hand, can sometimes spit out code that looks fine on the surface but hides weird, unpredictable quirks. Do you really want to spend your time debugging AI hallucinations?&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;2. Tailored to Your Needs&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Code generators let you configure things exactly the way you want, whether you're working with clean architecture, microservices, or a monolithic design. You decide how the models, repositories, and services are structured. AI-generated code? It often feels like a one-size-fits-all solution that doesn't quite fit your project, meaning you'll spend time fixing it instead of moving forward.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;3. Way Faster (and Less Frustrating) Than AI?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;You know that feeling when you start a new C# Web API project, and you're dreading all the repetitive setup: writing repositories, configuring EF Core, setting up controllers? Now, if you're using a database-first approach, it gets even trickier. You have an existing database structure and need to generate clean, efficient code that properly reflects it. AI tools might try to infer your needs, but they often miss critical details—misinterpreting relationships, generating inefficient queries, or just structuring things in ways that don't align with your architecture.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;4. Easier to Debug and Maintain&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Have you ever tried debugging AI-generated code? It's like deciphering someone else's hastily done homework. A code generator, on the other hand, provides predictable and structured output, making debugging much easier. You already know how the generated code is intended to function, so when issues arise, you can resolve them quickly without scratching your head.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;5. Seamless Integration with Your Stack&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Code generators work smoothly with your development tools, CI/CD pipelines, and version control systems. EF Core Sidekick, for example, integrates directly into your .NET workflow, making sure your EF Core code is structured just right. AI-generated code? Not so much. It often needs extra tweaking to fit into your setup, which kind of defeats the purpose of "automation".&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Look, AI has its place, but when it comes to reliably generating solid, maintainable code for your C# Web API, a code generator like EF Core Sidekick is the way to go. You'll get predictable, high-quality code that follows best practices, without the surprises that AI sometimes throws at you. Plus, it frees you up to focus on the real challenges of your project instead of cleaning up AI's best guesses.&lt;/p&gt;

&lt;p&gt;So why make life harder than it has to be? Stick with a good code generator, save time, and build confidently.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>dotnet</category>
      <category>dotnetcore</category>
      <category>csharp</category>
    </item>
    <item>
      <title>5 Essential Tools for Web API Development with EF Core</title>
      <dc:creator>Leo Smith</dc:creator>
      <pubDate>Wed, 12 Mar 2025 08:06:34 +0000</pubDate>
      <link>https://dev.to/leo_smith/5-essential-tools-for-web-api-development-with-ef-core-jen</link>
      <guid>https://dev.to/leo_smith/5-essential-tools-for-web-api-development-with-ef-core-jen</guid>
      <description>&lt;p&gt;When building robust and scalable Web APIs using &lt;code&gt;Entity Framework Core (EF Core)&lt;/code&gt;, leveraging the right set of tools throughout your development process can significantly enhance your productivity and maintainability. 📃 In this article, we explore 5 indispensable tools that help manage your database schema, optimize performance, document your API, and automate routine tasks. &lt;/p&gt;

&lt;h2&gt;
  
  
  1️⃣ &lt;a href="https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/" rel="noopener noreferrer"&gt;&lt;strong&gt;EF Core Migrations&lt;/strong&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22iti3xk231c2ctm23v2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22iti3xk231c2ctm23v2.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EF Core Migrations is the built-in mechanism that allows you to manage and evolve your database schema alongside your application. As your domain models change, migrations help keep your database in sync without losing data.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Key features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema Evolution:&lt;/strong&gt; Update your database schema seamlessly as your application evolves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Code Generation:&lt;/strong&gt; Generate migration scripts based on model changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback Support:&lt;/strong&gt; Easily revert to previous states when necessary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Control Integration:&lt;/strong&gt; Track schema changes alongside your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/" rel="noopener noreferrer"&gt;Learn more about EF Core Migrations&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2️⃣ &lt;a href="https://www.red-gate.com/products/flyway/" rel="noopener noreferrer"&gt;&lt;strong&gt;Flyway&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;– SQL-Based Database Migrations&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzihm3stpzds4j07a27os.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzihm3stpzds4j07a27os.png" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Flyway is a robust database migration tool that uses SQL scripts to manage schema changes. It integrates seamlessly with continuous integration/continuous deployment (CI/CD) pipelines and provides explicit control over every aspect of your SQL, making it ideal for teams that require precision in database versioning.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Key features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQL-Based Migrations:&lt;/strong&gt; Manage schema changes using plain SQL scripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Integration:&lt;/strong&gt; Automate migrations as part of your deployment process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Database Support:&lt;/strong&gt; Compatible with SQL Server, PostgreSQL, MySQL, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undo &amp;amp; Rollback Capabilities:&lt;/strong&gt; Support controlled rollbacks to maintain database integrity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://flywaydb.org/documentation/" rel="noopener noreferrer"&gt;Learn more about Flyway&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3️⃣ &lt;a href="https://hibernatingrhinos.com/products/efprof" rel="noopener noreferrer"&gt;&lt;strong&gt;EF Core Profiler&lt;/strong&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hb30zqgmsgz2tzixl5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hb30zqgmsgz2tzixl5d.png" alt="Image description" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EF Core Profiler is a specialized tool designed to monitor and analyze your EF Core database interactions. It plays a critical role in identifying and resolving performance bottlenecks by providing detailed insights into query execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Key features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Query Performance Analysis:&lt;/strong&gt; Detects slow queries and provides detailed execution statistics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;N+1 Query Detection:&lt;/strong&gt; Identifies inefficient query patterns that lead to unnecessary database calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Logging:&lt;/strong&gt; Captures SQL commands and interactions to streamline debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Integration:&lt;/strong&gt; Works directly with EF Core without requiring modifications to your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://hibernatingrhinos.com/products/efprof/learn" rel="noopener noreferrer"&gt;Learn more about EF Core Profiler&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4️⃣ &lt;a href="https://swagger.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Swagger (OpenAPI)&lt;/strong&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2p1dan4z9sn5e00b5owk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2p1dan4z9sn5e00b5owk.png" alt="Image description" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Swagger is an essential tool for documenting, testing, and interacting with your Web API. It automatically generates interactive documentation that makes it simple for developers and consumers to understand and test your endpoints.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Key features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interactive API Documentation:&lt;/strong&gt; Automatically generates a user-friendly interface for exploring your API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Generation Support:&lt;/strong&gt; Create client SDKs and server stubs in various programming languages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Testing:&lt;/strong&gt; Execute API calls directly from the documentation interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Integration:&lt;/strong&gt; Easily add to ASP.NET Core projects with Swashbuckle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://swagger.io/docs/" rel="noopener noreferrer"&gt;Learn more about Swagger&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5️⃣ &lt;a href="https://www.devmagic.com/efcore-sidekick" rel="noopener noreferrer"&gt;&lt;strong&gt;EF Core Sidekick&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;– A Must-Have for EF Core Development&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4q0aa0pit8rootvovd4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4q0aa0pit8rootvovd4j.png" alt="Image description" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EF Core Sidekick is a powerful Visual Studio extension that takes your EF Core development to the next level. It automates several repetitive tasks, such as reverse engineering, service scaffolding, and DTO generation, which helps keep your codebase clean and maintainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔹 &lt;strong&gt;Key features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Effortless Reverse Engineering:&lt;/strong&gt; Quickly generate EF Core entities and DbContext from your existing database, supporting EF Core versions 9.0, 8.0, 7.0, and 6.0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Scaffolding of Services:&lt;/strong&gt; Create CRUD services with configurable sorting and automatically generated LINQ queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless API Generation:&lt;/strong&gt; Scaffold APIs that integrate with authorization frameworks and support data encryption.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy DTO Generation &amp;amp; Mapping:&lt;/strong&gt; Automatically generate DTOs from selected entities, with options for built-in or external mapping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailored Code Generation:&lt;/strong&gt; Customize the generated code with directives, inheritance, and class attributes to ensure consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-Quality Code:&lt;/strong&gt; Produces well-structured, maintainable code that adheres to EF Core best practices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.devmagic.com/efcore-sidekick" rel="noopener noreferrer"&gt;Learn more about EF Core Sidekick&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;By combining these five tools: &lt;code&gt;EF Core Migrations&lt;/code&gt; and &lt;code&gt;Flyway&lt;/code&gt; for managing your database schema, &lt;code&gt;EF Core Profiler&lt;/code&gt; for performance monitoring, &lt;code&gt;Swagger&lt;/code&gt; for interactive API documentation, and &lt;code&gt;EF Core Sidekick&lt;/code&gt; for automating routine development tasks, you create a comprehensive, streamlined workflow for building robust Web APIs with EF Core.&lt;/p&gt;

&lt;p&gt;Integrate these essential tools into your development process and experience the difference they can make in delivering efficient, maintainable, and high-quality APIs.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tooling</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
