<?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: MAHMOUD BU SALEH</title>
    <description>The latest articles on DEV Community by MAHMOUD BU SALEH (@mahmoud_busaleh_cebde16f).</description>
    <link>https://dev.to/mahmoud_busaleh_cebde16f</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4240229%2F039b126c-220f-45be-bfd1-1a9caebe97fa.png</url>
      <title>DEV Community: MAHMOUD BU SALEH</title>
      <link>https://dev.to/mahmoud_busaleh_cebde16f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahmoud_busaleh_cebde16f"/>
    <language>en</language>
    <item>
      <title>I Built EFX to Turn 4 EF Core Steps Into One Command</title>
      <dc:creator>MAHMOUD BU SALEH</dc:creator>
      <pubDate>Thu, 12 Nov 2026 06:23:00 +0000</pubDate>
      <link>https://dev.to/mahmoud_busaleh_cebde16f/i-built-efx-to-turn-4-ef-core-steps-into-one-command-4le1</link>
      <guid>https://dev.to/mahmoud_busaleh_cebde16f/i-built-efx-to-turn-4-ef-core-steps-into-one-command-4le1</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnzjvci0720rj78j06v4x.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnzjvci0720rj78j06v4x.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;I kept doing the same thing every time I added an entity to an EF Core project.&lt;/p&gt;

&lt;p&gt;Create the class.&lt;/p&gt;

&lt;p&gt;Add the DbSet.&lt;/p&gt;

&lt;p&gt;Create the migration.&lt;/p&gt;

&lt;p&gt;Update the database.&lt;/p&gt;

&lt;p&gt;None of these steps is difficult. The annoying part is doing them again and again, especially when I'm prototyping and the database schema changes constantly.&lt;/p&gt;

&lt;p&gt;So I built a small .NET global tool called EFX.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;efx new Product
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of manually going through the whole setup, EFX handles the repetitive parts for me.&lt;/p&gt;

&lt;p&gt;It creates the entity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Product&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nc"&gt;Id&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then it registers the DbSet in the DbContext:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;DbSet&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Products&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, it runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet ef migrations add AddProduct
dotnet ef database update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the workflow becomes:&lt;/p&gt;

&lt;p&gt;Create entity → Register DbSet → Create migration → Update database&lt;/p&gt;

&lt;p&gt;with one command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I built it
&lt;/h3&gt;

&lt;p&gt;This isn't meant to replace EF Core or hide what's happening in the database.&lt;/p&gt;

&lt;p&gt;It's just about removing repetitive boilerplate.&lt;/p&gt;

&lt;p&gt;During early development, I can end up changing the schema several times in a short period. Having a tiny command that handles the mechanical steps makes that loop a little nicer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Current status
&lt;/h3&gt;

&lt;p&gt;EFX is still a small prototype, and that's exactly why I'm sharing it now.&lt;/p&gt;

&lt;p&gt;I'd like feedback from people who actually use EF Core:&lt;/p&gt;

&lt;p&gt;Would you use this?&lt;/p&gt;

&lt;p&gt;What would you change?&lt;/p&gt;

&lt;p&gt;What edge cases am I missing?&lt;/p&gt;

&lt;p&gt;Project:&lt;br&gt;
&lt;a href="https://github.com/dotnet/efcore/issues/39569#issuecomment-6786874939" rel="noopener noreferrer"&gt;https://github.com/dotnet/efcore/issues/39569#issuecomment-6786874939&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>efcore</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>One CLI command to handle EF Core entities and migrations? Let's discuss</title>
      <dc:creator>MAHMOUD BU SALEH</dc:creator>
      <pubDate>Thu, 12 Nov 2026 04:52:36 +0000</pubDate>
      <link>https://dev.to/mahmoud_busaleh_cebde16f/one-cli-command-to-handle-ef-core-entities-and-migrations-lets-discuss-29mo</link>
      <guid>https://dev.to/mahmoud_busaleh_cebde16f/one-cli-command-to-handle-ef-core-entities-and-migrations-lets-discuss-29mo</guid>
      <description>&lt;p&gt;Honestly, whenever I add a new model to an EF Core project, I feel like I'm stuck in the same repetitive loop: create the class file, jump into &lt;code&gt;DbContext&lt;/code&gt; to add the &lt;code&gt;DbSet&lt;/code&gt;, run &lt;code&gt;migrations add&lt;/code&gt;, and then run &lt;code&gt;database update&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Having worked with frameworks like Laravel, I really miss the speed of having &lt;strong&gt;one single CLI command that does it all&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I opened a proposal on the official EF Core repo (&lt;code&gt;#39569&lt;/code&gt;) to bring that kind of workflow to &lt;code&gt;dotnet-ef&lt;/code&gt;—letting us scaffold the entity, wire up the &lt;code&gt;DbSet&lt;/code&gt;, and sync the database in one go (via &lt;code&gt;dotnet ef entity create&lt;/code&gt; and &lt;code&gt;dotnet ef database sync&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Good news is, one of the EF Core team members looked at it and moved it into their &lt;strong&gt;Backlog&lt;/strong&gt; rather than closing it. They mentioned that community upvotes (&lt;code&gt;👍&lt;/code&gt;) are what actually help push these kinds of quality-of-life features up the priority list for future releases.&lt;/p&gt;

&lt;p&gt;If you're also tired of the manual boilerplate and think a single-command workflow would save you time, feel free to check out the discussion and drop a 👍 on the GitHub issue so it gets on their radar:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/dotnet/efcore/issues/39569" rel="noopener noreferrer"&gt;https://github.com/dotnet/efcore/issues/39569&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear how you guys usually handle this in your projects!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>dotnetcore</category>
      <category>efcore</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
