<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MBENGONO AKOA on Medium]]></title>
        <description><![CDATA[Stories by MBENGONO AKOA on Medium]]></description>
        <link>https://medium.com/@salomonakoa44?source=rss-4b14a6f3d9a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L698zm5JZaJdM69iGLFXLA.jpeg</url>
            <title>Stories by MBENGONO AKOA on Medium</title>
            <link>https://medium.com/@salomonakoa44?source=rss-4b14a6f3d9a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:15:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salomonakoa44/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Dependency Injection in .NET: Registering Services and Repositories with AddScoped()]]></title>
            <link>https://medium.com/@salomonakoa44/understanding-dependency-injection-in-net-registering-services-and-repositories-with-addscoped-ba8dab4e85b0?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba8dab4e85b0</guid>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 21:32:37 GMT</pubDate>
            <atom:updated>2026-11-02T21:32:37.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKwnr2O0PMQSYdoCsrprmQ.png" /></figure><p>Dependency Injection (DI) is one of the fundamental concepts every ASP.NET Core developer should understand.</p><p>When building applications with .NET, we often work with different layers, such as Controllers, Services, and Repositories. These layers need to communicate with one another, but directly creating dependencies using the new keyword can make our code tightly coupled and difficult to maintain.</p><p>This is where Dependency Injection comes in.</p><p>In this article, we’ll explore how to register services and repositories in ASP.NET Core using the built-in Dependency Injection container.</p><h3>1. What is Dependency Injection?</h3><p>Dependency Injection is a design pattern that allows a class to receive the objects it depends on rather than creating those objects itself.</p><p>Consider a simple example:</p><pre>public class ApplicationService<br>{<br>    private readonly ApplicationRepository _repository;<br><br>    public ApplicationService()<br>    {<br>        _repository = new ApplicationRepository();<br>    }<br>}</pre><p>Here, ApplicationService is responsible for creating its own repository instance.</p><p>This creates tight coupling. If we decide to replace ApplicationRepository with another implementation, we must modify the service itself.</p><p>A better approach is to depend on an abstraction.</p><pre>public class ApplicationService : IApplicationService<br>{<br>    private readonly IApplicationRepository _repository;<br><br>    public ApplicationService(IApplicationRepository repository)<br>    {<br>        _repository = repository;<br>    }<br>}</pre><p>Now, the service receives its repository through its constructor.</p><p>This is called <strong>Constructor Injection</strong>.</p><p>The responsibility of creating and providing the dependency is delegated to the Dependency Injection container.</p><h3>2. Registering Dependencies in Program.cs</h3><p>ASP.NET Core provides a built-in Dependency Injection container.</p><p>We register our dependencies using builder.Services in the Program.cs file.</p><p>For example:</p><pre>builder.Services.AddScoped&lt;IApplicationService, ApplicationService&gt;();<br>builder.Services.AddScoped&lt;IApplicationRepository, ApplicationRepository&gt;();</pre><p>Let’s understand what these two lines mean.</p><h3>Registering the Application Service</h3><pre>builder.Services.AddScoped&lt;IApplicationService, ApplicationService&gt;();</pre><p>This tells the Dependency Injection container:</p><p>Whenever a class requests IApplicationService, provide an instance of ApplicationService.</p><p>In other words:</p><ul><li>IApplicationService is the abstraction.</li><li>ApplicationService is its concrete implementation.</li></ul><h3>Registering the Application Repository</h3><pre>builder.Services.AddScoped&lt;IApplicationRepository, ApplicationRepository&gt;();</pre><p>Similarly, this tells the container:</p><p>Whenever a class requests IApplicationRepository, provide an instance of ApplicationRepository.</p><p>This allows our service to depend on the repository interface rather than its concrete implementation.</p><h3>3. Understanding AddScoped()</h3><p>You might have noticed that we used AddScoped() in both registrations.</p><p>But what does it actually mean?</p><p>ASP.NET Core provides three main service lifetimes:</p><p><strong>1. AddTransient()</strong></p><p>A new instance is created every time the dependency is requested.</p><pre>builder.Services.AddTransient&lt;IApplicationService, ApplicationService&gt;();</pre><p><strong>2. AddScoped()</strong></p><p>A single instance is created per dependency injection scope.</p><p>In a typical ASP.NET Core web application, each HTTP request has its own scope.</p><p>This means that within the same HTTP request, the same scoped service instance is reused.</p><pre>builder.Services.AddScoped&lt;IApplicationService, ApplicationService&gt;();</pre><p><strong>3. AddSingleton()</strong></p><p>Only one instance is created and shared throughout the application’s lifetime.</p><pre>builder.Services.AddSingleton&lt;IApplicationService, ApplicationService&gt;();</pre><p>Choosing the right lifetime is important because it affects how objects are created, shared, and disposed of.</p><p>For most request-based services and repositories, AddScoped() is a common choice.</p><p>It is particularly useful when working with Entity Framework Core because DbContext is scoped by default when registered using AddDbContext().</p><h3>4. How Does Everything Work Together?</h3><p>Let’s connect everything.</p><p>Imagine we have the following architecture:</p><pre>Controller<br>    |<br>    v<br>IApplicationService<br>    |<br>    v<br>ApplicationService<br>    |<br>    v<br>IApplicationRepository<br>    |<br>    v<br>ApplicationRepository</pre><p>When an HTTP request reaches our controller, ASP.NET Core creates the controller and resolves its dependencies.</p><p>If the controller requires IApplicationService, the DI container provides ApplicationService.</p><p>The ApplicationService constructor requires IApplicationRepository, so the container also provides ApplicationRepository.</p><p>All these dependencies are resolved automatically.</p><p>We don’t need to manually instantiate them using new.</p><h3>5. Complete Registration Example</h3><p>Here is what our Program.cs registration section might look like:</p><pre>var builder = WebApplication.CreateBuilder(args);<br><br>// Register application services<br>builder.Services.AddScoped&lt;IApplicationService, ApplicationService&gt;();<br>// Register repositories<br>builder.Services.AddScoped&lt;IApplicationRepository, ApplicationRepository&gt;();<br><br>// Register controllers<br>builder.Services.AddControllers();<br>var app = builder.Build();<br>app.MapControllers();<br>app.Run();</pre><p>Notice how clean and straightforward the registration process is.</p><p>As our application grows, we can register additional services and repositories without changing how our existing classes receive their dependencies.</p><h3>Conclusion</h3><p>Dependency Injection helps us build applications that are loosely coupled, easier to test, and easier to maintain.</p><p>By registering interfaces and their implementations using builder.Services.AddScoped(), we allow ASP.NET Core to manage object creation and dependency resolution for us.</p><p>If you’re building ASP.NET Core applications, understanding Dependency Injection is not optional. It’s one of the foundations of writing maintainable .NET applications.</p><p><strong>Happy coding! 🚀</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba8dab4e85b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Can Write Code. But Can It Make You a Better Software Engineer?]]></title>
            <link>https://medium.com/@salomonakoa44/ai-can-write-code-but-can-it-make-you-a-better-software-engineer-70416628d809?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/70416628d809</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 16:40:44 GMT</pubDate>
            <atom:updated>2026-10-16T16:40:44.366Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2cDnp7k_4LdQNv-v1u_jQ.png" /></figure><p>AI is changing the way we write software.</p><p>Today, you can describe a feature in plain English and get working code in seconds. You can ask an AI assistant to explain a confusing error, generate unit tests, refactor a method, or even build an entire application.</p><p>Things that once took hours can sometimes be accomplished in minutes.</p><p>That’s impressive.</p><p>But it raises a question I think every developer should ask themselves:</p><p><strong>Is AI helping us become better software engineers, or simply helping us write code faster?</strong></p><p>I believe the difference matters more than we realize.</p><h3>Writing Code Is Only Part of Software Engineering</h3><p>For a long time, learning to program meant spending hours understanding syntax, studying documentation, debugging errors, and figuring out how different parts of an application fit together.</p><p>Today, AI can help with many of these tasks.</p><p>Need a C# class? Ask AI.</p><p>Need a REST API built with ASP.NET Core? AI can generate a starting point.</p><p>Need to understand a compiler error? Paste it into an AI assistant and get an explanation.</p><p>These capabilities are genuinely useful. They can reduce friction, accelerate learning, and help developers explore solutions they might not have considered.</p><p>However, software engineering involves much more than producing code.</p><p>A good software engineer must understand the problem before attempting to solve it. They must make decisions about architecture, data integrity, security, performance, maintainability, and trade-offs.</p><p>A program can compile successfully and still be a terrible solution to the problem it was supposed to solve.</p><p><strong>AI can generate an implementation, but we still need the judgment to determine whether that implementation is appropriate.</strong></p><h3>The Danger of Accepting Code We Don’t Understand</h3><p>Imagine you’re building a registration endpoint in ASP.NET Core.</p><p>You ask an AI assistant to implement it. Within seconds, it generates a controller, a service, an interface, a database configuration, and a few validation rules.</p><p>Everything looks professional.</p><p>The project builds successfully, and Swagger allows you to test the endpoint.</p><p>You might feel that you’ve made significant progress.</p><p>But have you checked how passwords are stored? What happens when a user registers with an existing email address? Is input validation sufficient? Are database errors handled appropriately? Can the implementation be tested easily? Does the architecture make sense for an application of this size?</p><p>If you cannot answer these questions, you may have working code without understanding the system you are building.</p><p>This is where AI-assisted development can become dangerous.</p><p>Not because AI is inherently bad, but because it makes it easier to produce code before developing the knowledge required to evaluate it.</p><p>The problem isn’t using AI.</p><p><strong>The problem is confusing code generation with engineering competence.</strong></p><h3>AI Can Make You a Better Developer If You Use It Correctly</h3><p>I don’t believe developers should avoid AI to prove that they can code without assistance.</p><p>That would be like refusing to use a debugger because you want to demonstrate your debugging abilities.</p><p>The real opportunity is learning how to use these tools without surrendering your thinking.</p><p>Here are four ways I believe AI can help us become better software engineers.</p><h3>1. Use AI to Understand, Not Just Generate</h3><p>Instead of asking AI to build an entire application, ask it to explain a concept you’re struggling with.</p><p>For example, when working with interfaces and dependency injection in C#, you can ask:</p><ul><li>Why should I use an interface here?</li><li>What problem does dependency injection solve?</li><li>What would happen if I registered this service with a different lifetime?</li><li>Could I solve this problem with a simpler design?</li></ul><p>Then test what you’ve learned by implementing the solution yourself.</p><p>The objective is not simply to obtain an answer. It’s to understand the reasoning behind it.</p><h3>2. Ask AI to Challenge Your Decisions</h3><p>Developers sometimes become attached to their implementations.</p><p>AI can act as a second pair of eyes.</p><p>Ask it to review your code for potential security issues, unnecessary complexity, missing validation, performance concerns, and weak error handling.</p><p>But don’t automatically accept every recommendation.</p><p>AI can misunderstand your requirements or suggest unnecessary abstractions. Review its feedback, verify important claims, and decide which changes are justified.</p><p>The final engineering decision remains yours.</p><h3>3. Use AI to Learn From Your Mistakes</h3><p>Debugging is one of the most valuable ways to develop problem-solving skills.</p><p>When an error occurs, resist the temptation to immediately ask AI for the complete fix.</p><p>First, read the error message. Identify what you expected to happen and what actually happened. Form a hypothesis and investigate.</p><p>Then use AI to explore possible causes or challenge your hypothesis.</p><p>This approach allows you to benefit from AI while still developing the ability to diagnose unfamiliar problems.</p><p>Over time, you want to become better at solving problems — not merely better at describing them to a chatbot.</p><h3>4. Build Real Projects and Take Responsibility for Them</h3><p>Tutorials and generated examples are useful, but real engineering experience comes from dealing with the details.</p><p>Build something that solves an actual problem. Write tests, handle unexpected inputs, Investigate failures, review your dependencies, deploy the application and monitor how it behaves.</p><p>AI can assist throughout this process.</p><p>However, you should be able to explain the important decisions, identify the limitations, and take responsibility for the result.</p><p>The goal is to move from someone who can generate an application to someone who can engineer, maintain, and improve a reliable system.</p><h3>What Happens to Junior Developers?</h3><p>This is an especially important question.</p><p>If AI can generate code, will junior developers still need to learn programming fundamentals?</p><p>I believe they will.</p><p>In fact, fundamentals may become even more important when developers need to evaluate solutions generated by AI.</p><p>Understanding data structures, algorithms, databases, HTTP, networking, operating systems, testing, and software design gives you a foundation for recognizing incorrect assumptions and making better decisions.</p><p>You don’t need to memorize every method in every framework. Documentation and AI can help you retrieve information.</p><p>But there is a difference between forgetting the exact syntax of a method and not understanding what the method is supposed to accomplish.</p><p>One is a knowledge-retrieval problem. The other is a conceptual problem.</p><p>AI can help with both, but you still need to do the work of learning.</p><p>Junior developers should not compete with AI by trying to type faster. They should learn to use AI effectively while steadily building the knowledge and judgment that make their work reliable.</p><h3>The Developers Who Benefit Most From AI</h3><p>I suspect the developers who benefit most from AI will be those who combine technical fundamentals with curiosity, critical thinking, and the ability to work through unfamiliar problems.</p><p>They will know when to use AI, when to question its output, and when to investigate a problem themselves.</p><p>They will understand that generating code is only one step in building software.</p><p>AI may reduce the time required to implement certain features. That doesn’t eliminate the need to understand what those features should do, how they should behave under failure, or whether they meet the needs of the people using them.</p><p>The advantage isn’t necessarily knowing the most AI tools.</p><p>It’s knowing how to turn their capabilities into reliable software.</p><h3>Final Thoughts</h3><p>I see AI as an opportunity for developers, not a reason to stop learning.</p><p>We have access to tools that can explain difficult concepts, generate examples, suggest improvements, and accelerate experimentation. Used well, they can help us learn more efficiently and spend more time on meaningful engineering problems.</p><p>But we shouldn’t allow convenience to replace understanding.</p><p>The next time AI generates a solution for you, don’t stop at asking whether the code works.</p><p>Ask yourself whether you understand it, whether it solves the right problem, whether it is safe and maintainable, and whether you could explain your decisions to another engineer.</p><p>Because the real measure of progress isn’t how much code you can generate in an hour.</p><p><strong>It’s how much better you become at solving problems and building software that people can trust.</strong></p><p>I’d love to hear your perspective:</p><p><strong>Has AI made you a better software engineer, or has it mainly made you faster at writing code? And what are you doing to ensure that you’re still learning ?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70416628d809" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your .NET API Works. But Is It Actually Production-Ready?]]></title>
            <link>https://medium.com/@salomonakoa44/your-net-api-works-but-is-it-actually-production-ready-e0f2742a7977?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0f2742a7977</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 23:34:18 GMT</pubDate>
            <atom:updated>2026-08-14T23:34:18.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Ftcue83O6CIBDPs4wdMZA.png" /></figure><p><em>A practical guide to taking an ASP.NET Core API from “it works on my machine” to something you can confidently deploy.</em></p><p>Your endpoint returns 200 OK.</p><p>Your database query works.</p><p>Swagger looks beautiful.</p><p>Congratulations — you built an API.</p><p>But here’s the uncomfortable question:</p><p><strong>Is it actually production-ready?</strong></p><ul><li>What happens when 500 users hit your API at the same time?</li><li>What happens when the database goes down?</li><li>What happens when a client sends malformed data?</li><li>What happens when someone starts hammering your authentication endpoint?</li><li>What happens when your application throws an exception at 2 AM and nobody knows why?</li></ul><p>This is where backend engineering becomes much more than creating controllers and writing CRUD operations.</p><p>A production API needs to be <strong>reliable, secure, observable, maintainable, and resilient</strong>.</p><p>In this article, we’ll look at the most important things you should consider before calling your ASP.NET Core API “production-ready.”</p><h3>1. Global Exception Handling</h3><p>Let’s start with one of the most common mistakes.</p><p>Imagine this controller:</p><pre>[HttpGet(&quot;{id}&quot;)]<br>public async Task&lt;IActionResult&gt; GetUser(int id)<br>{<br>    var user = await _userService.GetByIdAsync(id);<br>    <br>    return Ok(user);<br>}</pre><p>Looks perfectly fine. But what happens if _userService.GetByIdAsync() throws an exception?</p><p>If you’re relying on exceptions being handled individually inside every controller, your application can quickly become inconsistent.</p><p>One endpoint might return:</p><pre>{<br>  &quot;message&quot;: &quot;Something went wrong&quot;<br>}</pre><p>Another might expose internal exception details.</p><p>Another might return a generic 500.</p><p>That’s not ideal.</p><h3>Use centralized exception handling</h3><p>Modern ASP.NET Core provides mechanisms for handling exceptions globally.</p><p>For example:</p><pre>app.UseExceptionHandler();</pre><p>You can also implement custom exception handling middleware or use IExceptionHandler to provide consistent responses.</p><p>The goal is simple:</p><p><strong>Controllers should focus on business logic, not manually handling every unexpected exception.</strong></p><p>Your API should consistently transform known exceptions into meaningful HTTP responses while hiding internal implementation details.</p><h3>2. Validate Incoming Data</h3><p>Never assume that clients will send valid data.</p><p>Consider:</p><pre>public record CreateUserRequest(<br>    string Name,<br>    string Email,<br>    int Age<br>);</pre><p>A client could send:</p><pre>{<br>  &quot;name&quot;: &quot;&quot;,<br>  &quot;email&quot;: &quot;hello&quot;,<br>  &quot;age&quot;: -500<br>}</pre><p>Your application should reject that request before it reaches your business logic.</p><p>With ASP.NET Core, you can use validation attributes:</p><pre>public class CreateUserRequest<br>{<br>    [Required]<br>    [MinLength(2)]<br>    public string Name { get; set; } = string.Empty;<br><br>    [Required]<br>    [EmailAddress]<br>    public string Email { get; set; } = string.Empty;<br><br>    [Range(18, 120)]<br>    public int Age { get; set; }<br>}</pre><p>Now your API has a basic validation boundary.</p><p>For more complex applications, libraries such as FluentValidation can provide more expressive validation rules.</p><p>The principle remains the same:</p><blockquote><strong><em>Validate at the boundary of your system.</em></strong></blockquote><p>Don’t allow invalid data to travel deep into your application before discovering that something is wrong.</p><h3>3. Return Consistent API Responses</h3><p>Your API shouldn’t feel like five different developers built five different APIs.</p><p>Imagine these responses:</p><p>Endpoint A:</p><pre>{<br>  &quot;message&quot;: &quot;User not found&quot;<br>}</pre><p>Endpoint B:</p><pre>{<br>  &quot;error&quot;: &quot;User does not exist&quot;<br>}</pre><p>Endpoint C:</p><pre>{<br>  &quot;status&quot;: 404,<br>  &quot;details&quot;: &quot;No user was found&quot;<br>}</pre><p>All technically work.</p><p>But consistency matters.</p><p>ASP.NET Core supports <strong>Problem Details</strong>, which provides a standardized structure for communicating errors.</p><p>For example:</p><pre>{<br>  &quot;type&quot;: &quot;https://example.com/errors/user-not-found&quot;,<br>  &quot;title&quot;: &quot;User Not Found&quot;,<br>  &quot;status&quot;: 404,<br>  &quot;detail&quot;: &quot;The requested user does not exist.&quot;<br>}</pre><p>Clients can then build predictable error handling around your API.</p><p>Production APIs should be predictable.</p><h3>4. Authentication Is Not Authorization</h3><p>This distinction is incredibly important.</p><p><strong>Authentication</strong> answers — <strong>w<em>ho are you?</em></strong></p><p><strong>Authorization</strong> answers — <strong>w<em>hat are you allowed to do?</em></strong></p><p>For example, a user may successfully authenticate:</p><pre>User → Login → JWT → Authenticated</pre><p>But that doesn’t mean the user should be allowed to delete another user’s account.</p><p>You might have:</p><pre>[Authorize]<br>[HttpGet]<br>public IActionResult GetProfile()<br>{<br>    ...<br>}</pre><p>And more restrictive policies:</p><pre>[Authorize(Roles = &quot;Admin&quot;)]<br>[HttpDelete(&quot;{id}&quot;)]<br>public async Task&lt;IActionResult&gt; DeleteUser(int id)<br>{<br>    ...<br>}</pre><p>For larger systems, policy-based authorization is often more flexible than relying exclusively on roles.</p><p>Security should be designed into the API rather than added as an afterthought.</p><h3>5. Never Hardcode Secrets</h3><p>This is bad:</p><pre>var connectionString =<br>    &quot;Server=localhost;Database=MyDb;User=admin;Password=SuperSecret123!&quot;;</pre><p>Please don’t.</p><p>Your source code should not contain production credentials.</p><p>Use configuration systems and secret stores appropriate to your environment.</p><p>For example:</p><pre>{<br>  &quot;ConnectionStrings&quot;: {<br>    &quot;DefaultConnection&quot;: &quot;...&quot;<br>  }<br>}</pre><p>And inject configuration where needed.</p><p>For development, environment variables and user secrets can be useful.</p><p>For production, cloud secret-management services such as Azure Key Vault or AWS Secrets Manager are much better options.</p><p>And obviously:</p><p><strong>Don’t commit </strong><strong>.env files containing real credentials to Git.</strong></p><h3>6. Logging: Your Future Self Will Thank You</h3><p>Imagine your API crashes at 3 AM.</p><p>A user reports:</p><blockquote><em>“The checkout doesn’t work.”</em></blockquote><p>You open the server.</p><p>Nothing.</p><p>You have no useful logs.</p><p>Now you are debugging production with nothing but vibes.</p><p>Not ideal.</p><p>Good logging should tell you what happened.</p><p>For example:</p><pre>_logger.LogInformation(<br>    &quot;Creating order for user {UserId}&quot;,<br>    userId<br>);</pre><p>And when something fails:</p><pre>_logger.LogError(<br>    exception,<br>    &quot;Failed to create order for user {UserId}&quot;,<br>    userId<br>);</pre><p>Notice that we’re using structured logging rather than building strings manually.</p><p>That makes logs much easier to search and analyze.</p><p>Also, avoid logging sensitive information such as:</p><ul><li>Passwords</li><li>Access tokens</li><li>Credit card information</li><li>Private personal information</li></ul><p>Logging everything isn’t observability.</p><p><strong>Useful information is observability.</strong></p><h3>7. Add Health Checks</h3><p>Your API might be running while its dependencies are completely broken.</p><p>For example:</p><pre>API<br> ↓<br>PostgreSQL ❌<br> ↓<br>Redis ❌<br> ↓<br>External Payment API ❌</pre><p>Your process is alive.</p><p>But your application isn’t actually healthy.</p><p>ASP.NET Core supports health checks:</p><pre>builder.Services.AddHealthChecks()<br>    .AddDbContextCheck&lt;AppDbContext&gt;();</pre><p>Then:</p><pre>app.MapHealthChecks(&quot;/health&quot;);</pre><p>Now your infrastructure can determine whether your application is healthy.</p><p>This becomes particularly useful when deploying with:</p><ul><li>Docker</li><li>Kubernetes</li><li>Azure</li><li>AWS</li><li>Load balancers</li><li>Container orchestration systems</li></ul><p>Health checks are small, but they become incredibly valuable once your system grows.</p><h3>8. Don’t Ignore Database Performance</h3><p>Your API can have beautifully designed C# code and still be slow because of one terrible database query.</p><p>For example:</p><pre>var users = await _context.Users<br>    .ToListAsync();</pre><p>If your Users table eventually contains millions of records, you&#39;re going to have a bad day.</p><p>Instead, think about:</p><h3>Pagination</h3><pre>var users = await _context.Users<br>    .Skip((page - 1) * pageSize)<br>    .Take(pageSize)<br>    .ToListAsync();</pre><h3>Projection</h3><p>Instead of retrieving entire entities:</p><pre>var users = await _context.Users<br>    .Select(u =&gt; new UserDto<br>    {<br>        Id = u.Id,<br>        Name = u.Name,<br>        Email = u.Email<br>    })<br>    .ToListAsync();</pre><p>You’re asking the database for only what you need.</p><p>Also pay attention to:</p><ul><li>Indexes</li><li>N+1 queries</li><li>Unnecessary Include()</li><li>Tracking vs AsNoTracking()</li><li>Query execution plans</li><li>Database connection pooling</li></ul><p>A production backend engineer needs to understand the database, not just Entity Framework Core.</p><h3>9. Introduce Caching Where It Actually Helps</h3><p>Suppose your API repeatedly requests data that rarely changes.</p><p>For example:</p><pre>GET /api/products/categories</pre><p>If 10,000 users request the same data, hitting the database 10,000 times may be unnecessary.</p><p>Caching can help.</p><p>For distributed applications, Redis is a common choice.</p><p>The general flow becomes:</p><pre>Client<br>   ↓<br>API<br>   ↓<br>Redis<br>   ↓<br>Database</pre><p>The API checks the cache first.</p><p>If the data exists:</p><pre>Cache HIT → Return data</pre><p>If it doesn’t:</p><pre>Cache MISS → Database → Store in Redis → Return data</pre><p>But don’t add Redis just because you’ve heard that production systems use Redis.</p><p>Caching introduces complexity.</p><p>You need to think about:</p><ul><li>Expiration</li><li>Cache invalidation</li><li>Stale data</li><li>Cache keys</li><li>Memory usage</li><li>Distributed consistency</li></ul><p>Use caching when it solves a real problem.</p><h3>10. Protect Your API With Rate Limiting</h3><p>Without rate limiting, an endpoint can potentially be abused.</p><p>Imagine:</p><pre>POST /api/auth/login</pre><p>An attacker sends thousands of requests per minute.</p><p>Even if every request fails, your server still has to process them.</p><p>Rate limiting helps control this.</p><p>Modern ASP.NET Core includes built-in rate limiting capabilities.</p><p>For example, you can configure policies that restrict the number of requests allowed within a period.</p><p>Conceptually:</p><pre>100 requests / minute</pre><p>After that:</p><pre>429 Too Many Requests</pre><p>Rate limiting is especially important for:</p><ul><li>Login endpoints</li><li>Password reset</li><li>Public APIs</li><li>Search endpoints</li><li>Expensive operations</li></ul><p>Security isn’t only about authentication.</p><p><strong>Availability is also part of security.</strong></p><h3>11. Use Cancellation Tokens</h3><p>Here’s a small improvement that many developers overlook.</p><p>Instead of:</p><pre>public async Task&lt;IActionResult&gt; GetUsers()<br>{<br>    var users = await _service.GetUsersAsync();<br><br>    return Ok(users);<br>}</pre><p>Consider:</p><pre>public async Task&lt;IActionResult&gt; GetUsers(<br>    CancellationToken cancellationToken)<br>{<br>    var users = await _service.GetUsersAsync(<br>        cancellationToken);<br><br>    return Ok(users);<br>}</pre><p>Why? Because clients can disconnect.</p><p>If the request is no longer needed, your application should ideally stop unnecessary work.</p><p>Cancellation tokens become particularly valuable for:</p><ul><li>Database operations</li><li>HTTP calls</li><li>Long-running processes</li><li>External services</li></ul><p>It’s a small detail that demonstrates mature asynchronous programming</p><h3>12. Don’t Let Controllers Become God Classes</h3><p>This is a classic problem.</p><p>You start with:</p><pre>UsersController</pre><p>Then it slowly becomes:</p><pre>UsersController<br>├── validation<br>├── database queries<br>├── business logic<br>├── email sending<br>├── payment processing<br>├── authorization logic<br>├── file uploads<br>└── 900 lines of code</pre><p>Your controller should coordinate HTTP concerns.</p><p>Business logic should live in appropriate application/domain services.</p><p>For example:</p><pre>Controller<br>    ↓<br>Application Service<br>    ↓<br>Domain Logic<br>    ↓<br>Infrastructure<br>    ↓<br>Database</pre><p>You don’t necessarily need a gigantic Clean Architecture implementation for every CRUD application.</p><p>But you should maintain clear boundaries.</p><p><strong>Architecture should reduce complexity, not create ceremony.</strong></p><h3>13. Write Tests</h3><p>If the only way you know your API works is by opening Swagger and clicking buttons, you have a problem.</p><p>Swagger is useful.</p><p>It is not a testing strategy.</p><p>You should consider several layers of testing:</p><h3>Unit tests</h3><p>Test isolated business logic.</p><h3>Integration tests</h3><p>Test how components work together.</p><p>For example:</p><pre>API → Service → EF Core → Database</pre><h3>End-to-end tests</h3><p>Test realistic user flows across the system.</p><p>You don’t necessarily need thousands of tests.</p><p>But critical business logic should have automated protection against regressions.</p><p>A production deployment shouldn’t depend entirely on:</p><blockquote><em>“I tested it manually yesterday.”</em></blockquote><h3>14. Make Your API Observable</h3><p>Logs tell you what happened.</p><p>Metrics tell you <strong>how often and how much</strong>.</p><p>Tracing tells you <strong>where time was spent across a distributed request</strong>.</p><p>Imagine a request:</p><pre>Client<br>  ↓<br>API<br>  ↓<br>Order Service<br>  ↓<br>Payment Service<br>  ↓<br>Database</pre><p>The request takes 4 seconds.</p><p>Why?</p><p>Without distributed tracing, you may have no idea.</p><p>With proper observability, you can discover something like:</p><pre>API                  50ms<br>Order Service       100ms<br>Payment Service    3.7s<br>Database             50ms</pre><p>Now you know where the problem is.</p><p>This is where concepts such as <strong>OpenTelemetry</strong>, metrics, traces, structured logging, and correlation IDs become important.</p><p>As your system becomes more distributed, observability stops being optional.</p><h3>15. Containerize the Application</h3><p>A production API should be easy to build and deploy consistently.</p><p>Docker helps.</p><p>A simplified Dockerfile might look like:</p><pre>FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base<br>WORKDIR /app<br>EXPOSE 8080</pre><pre>FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build<br>WORKDIR /src</pre><pre>COPY . .</pre><pre>RUN dotnet restore</pre><pre>RUN dotnet publish \<br>    -c Release \<br>    -o /app/publish \<br>    --no-restore</pre><pre>FROM base AS final<br>WORKDIR /app</pre><pre>COPY --from=build /app/publish .</pre><pre>ENTRYPOINT [&quot;dotnet&quot;, &quot;MyApi.dll&quot;]</pre><p>Now your application can run consistently across environments.</p><pre>Developer Machine<br>       ↓<br>      Docker<br>       ↓<br>   CI/CD Pipeline<br>       ↓<br>     Production</pre><p>That consistency is extremely valuable.</p><h3>16. Configuration Must Be Environment-Aware</h3><p>Your development environment isn’t production.</p><p>You might have:</p><pre>Development<br>Staging<br>Production</pre><p>Each environment may have different:</p><ul><li>Database connections</li><li>API keys</li><li>Logging levels</li><li>Feature flags</li><li>External service URLs</li><li>Caching configuration</li></ul><p>Your application should be designed to receive configuration rather than having environment-specific values hardcoded into the application.</p><p>This makes deployments safer and easier to automate.</p><h3>17. Document Your API</h3><p>This is one area where ASP.NET Core developers have a huge advantage.</p><p>OpenAPI and Swagger make it much easier to expose interactive API documentation.</p><p>But don’t stop at generating endpoints.</p><p>Good API documentation should explain:</p><ul><li>What the endpoint does</li><li>Required parameters</li><li>Request body</li><li>Response formats</li><li>Authentication requirements</li><li>Possible errors</li><li>Examples</li></ul><p>Your API consumers shouldn’t need to read your source code to understand how your API works.</p><h3>18. Think About Failure, Not Just Success</h3><p>This might be the biggest mindset shift.</p><p>When building an API, developers naturally think:</p><pre>Request<br>  ↓<br>Success<br>  ↓<br>200 OK</pre><p>Production systems require a different mindset:</p><pre>Request<br>  ↓<br>What if the database is down?<br>  ↓<br>What if Redis is unavailable?<br>  ↓<br>What if the external API times out?<br>  ↓<br>What if the request is duplicated?<br>  ↓<br>What if the client disconnects?<br>  ↓<br>What if the server restarts?<br>  ↓<br>What if traffic suddenly increases 20x?</pre><p>This is where concepts like:</p><ul><li>Timeouts</li><li>Retries</li><li>Circuit breakers</li><li>Idempotency</li><li>Resilience</li><li>Backpressure</li><li>Graceful degradation</li></ul><p>become important.</p><p>The goal isn’t to prevent every failure.</p><p><strong>The goal is to make failure predictable and manageable.</strong></p><h3>So… Is Your .NET API Production-Ready?</h3><p>Let’s bring everything together.</p><p>Before deploying an ASP.NET Core API, ask yourself:</p><h3>Reliability</h3><ul><li>Does the API handle unexpected exceptions?</li><li>Are dependencies monitored?</li><li>Are timeouts configured?</li><li>Can the application recover from failures?</li></ul><h3>Security</h3><ul><li>Is authentication implemented correctly?</li><li>Is authorization enforced?</li><li>Are secrets protected?</li><li>Is sensitive information excluded from logs?</li><li>Is rate limiting configured where appropriate?</li></ul><h3>Performance</h3><ul><li>Are database queries optimized?</li><li>Is pagination implemented?</li><li>Are indexes appropriate?</li><li>Is caching actually necessary?</li><li>Are expensive operations controlled?</li></ul><h3>Observability</h3><ul><li>Do you have structured logs?</li><li>Do you have metrics?</li><li>Do you have health checks?</li><li>Can you trace requests across services?</li><li>Will you know when something breaks?</li></ul><h3>Maintainability</h3><ul><li>Are responsibilities separated?</li><li>Are controllers kept focused?</li><li>Is business logic testable?</li><li>Is configuration externalized?</li><li>Is the API documented?</li></ul><h3>Deployment</h3><ul><li>Is the application containerized?</li><li>Do you have a CI/CD pipeline?</li><li>Are development and production environments separated?</li><li>Can you deploy consistently?</li><li>Can you roll back safely?</li></ul><h3>Production-Ready Doesn’t Mean Perfect</h3><p>Here’s something worth remembering.</p><p>You don’t need to build a distributed, Kubernetes-powered, event-driven architecture for a simple application with 500 users.</p><p>That’s not engineering maturity.</p><p>That’s architecture cosplay. 😂</p><p>A production-ready application is one that has been designed appropriately for its <strong>actual requirements</strong>.</p><p>A small internal API might need:</p><pre>ASP.NET Core<br>+<br>PostgreSQL<br>+<br>Authentication<br>+<br>Validation<br>+<br>Logging<br>+<br>Health checks<br>+<br>Tests</pre><p>A large financial platform might require:</p><pre>Multiple services<br>+<br>Distributed tracing<br>+<br>Message brokers<br>+<br>Redis<br>+<br>Rate limiting<br>+<br>Circuit breakers<br>+<br>Multiple databases<br>+<br>High availability<br>+<br>Automated deployments<br>+<br>Advanced observability</pre><p>The right architecture depends on the problem.</p><p><strong>Don’t build complexity because it looks impressive on your resume. Build it because your system needs it.</strong></p><h3>The Real Difference Between a Demo and a Production System</h3><p>A demo asks:</p><blockquote><strong><em>“Does it work?”</em></strong></blockquote><p>A production system asks:</p><blockquote><strong><em>“What happens when it doesn’t?”</em></strong></blockquote><p>That’s the difference.</p><p>Writing an endpoint is only one part of backend engineering.</p><p>The deeper skill is understanding what happens around that endpoint:</p><ul><li>when traffic increases,</li><li>when dependencies fail,</li><li>when users send bad data,</li><li>when attackers abuse the system,</li><li>when databases become slow,</li><li>when deployments go wrong,</li><li>and when something inevitably breaks.</li></ul><p>That’s when your knowledge of C# and ASP.NET Core starts turning into actual backend engineering.</p><p>So next time your API returns 200 OK, don&#39;t immediately celebrate.</p><p>Ask one more question:</p><p><strong>“What happens when everything goes wrong?”</strong></p><p>That’s where production readiness begins.</p><h3>I write about C#, .NET, and real-world backend development.<br>Follow for more practical insights.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0f2742a7977" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why .NET and C# Are Still One of the Best Choices for Modern Development in 2026]]></title>
            <link>https://medium.com/@salomonakoa44/why-net-and-c-are-still-one-of-the-best-choices-for-modern-development-in-2026-4fb14e8c40bf?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fb14e8c40bf</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 11:25:05 GMT</pubDate>
            <atom:updated>2026-04-23T11:25:05.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Ftcue83O6CIBDPs4wdMZA.png" /></figure><p>If you’ve been around software development for a while, you’ve probably heard people argue about languages and frameworks like it’s a football match: Java vs C#, Node.js vs .NET, Python everywhere, and so on.</p><p>But here’s the reality most people quietly agree on: <strong>.NET and C# are not just relevant — they’re thriving in modern software development.</strong></p><p>Let’s break down why.</p><h3>1. .NET is no longer just “Microsoft’s framework”</h3><p>Modern .NET (especially .NET 6/7/8+) is:</p><ul><li>Cross-platform (Windows, Linux, macOS)</li><li>Open-source</li><li>High-performance</li><li>Actively used in cloud-native systems</li></ul><p>This shift changed everything. You’re no longer locked into a Windows ecosystem. You can build backend systems, APIs, microservices, and even cloud-native applications anywhere.</p><h3>2. C# has evolved into a powerhouse language</h3><p>C# today is nothing like the “corporate-only” language people used to describe.</p><p>It now includes:</p><ul><li>Pattern matching</li><li>Records and immutability features</li><li>Async/await for scalable systems</li><li>Top-tier LINQ for data manipulation</li><li>Strong typing with modern syntax improvements</li></ul><p>It feels modern, expressive, and productive — not bloated.</p><h3>3. Backend development is where .NET shines</h3><p>If you’re building:</p><ul><li>REST APIs</li><li>Microservices</li><li>SaaS platforms</li><li>Enterprise systems</li><li>Banking or fintech apps</li></ul><p>.NET is extremely strong here.</p><p>With <strong>ASP.NET Core</strong>, you get:</p><ul><li>High performance</li><li>Built-in dependency injection</li><li>Middleware pipelines</li><li>Easy authentication/authorization systems</li><li>Great integration with databases and cloud services</li></ul><h3>4. The ecosystem is built for real-world production</h3><p>This is where .NET quietly dominates.</p><p>You get:</p><ul><li>Entity Framework Core (ORM)</li><li>SignalR (real-time communication)</li><li>Minimal APIs (lightweight services)</li><li>Azure integration (first-class support)</li><li>Docker + Kubernetes compatibility</li></ul><p>In short: it’s not just about coding, it’s about shipping production systems.</p><h3>5. Job market reality (important one)</h3><p>Companies still heavily rely on .NET for:</p><ul><li>Enterprise systems</li><li>Internal tools</li><li>Banking systems</li><li>Government platforms</li><li>SaaS products</li></ul><p>And because fewer beginners start with .NET compared to JavaScript or Python, there’s often <strong>less noise and more opportunity</strong> in the job market.</p><h3>6. Why I personally like it (and why it matters for beginners)</h3><p>If you’re learning programming, C# gives you:</p><ul><li>Structure (you don’t learn bad habits early)</li><li>Strong typing (fewer “random bugs”)</li><li>A clear path to backend + full-stack</li><li>Easy transition into cloud development</li></ul><p>It’s one of the most “career-stable” stacks you can choose.</p><h3>Final thought</h3><p>The tech world loves trends, but production systems love stability.</p><p>And that’s exactly where .NET and C# sit:<br><strong>modern, stable, scalable, and quietly powering a huge part of the software world.</strong></p><p>If you’re choosing a stack in 2026, don’t ignore it — it might just be one of the smartest long-term decisions you make.</p><blockquote>I write about C#, .NET, and real-world backend development.<br>Follow for more practical insights.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fb14e8c40bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Enable Swagger in .NET 10 (Step-by-Step Guide + Video)]]></title>
            <link>https://medium.com/@salomonakoa44/how-to-enable-swagger-in-net-10-step-by-step-guide-video-ad03e9d19451?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad03e9d19451</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 09:00:00 GMT</pubDate>
            <atom:updated>2026-04-13T09:00:00.092Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3v_6USi275CkA6XsuHoKjg.png" /></figure><p>When building APIs in .NET, testing endpoints manually can quickly become frustrating.</p><p>Instead of using external tools for every request, you can enable Swagger and get a clean, interactive UI directly in your browser.</p><p>In this guide, you’ll learn how to enable Swagger in .NET 10 step by step and I’ve included a full video tutorial if you prefer to follow along visually.</p><h3>Quick Answer</h3><p>1. Add Swagger services:</p><pre>builder.Services.AddEndpointsApiExplorer();<br>builder.Services.AddSwaggerGen();</pre><p>2. Enable Swagger middleware:</p><pre>app.UseSwagger();<br>app.UseSwaggerUI();</pre><p>3. Run your project and go to :</p><pre>/swagger</pre><p>That’s it. 🎉</p><h3><strong>Watch the Full Tutorial</strong></h3><p>I also created a complete video walkthrough where I implement everything step by step:</p><p>👉 <a href="https://youtu.be/g03rxZXnFHM?si=bUPMLQ3UAacZ2mRt">https://youtu.be/g03rxZXnFHM?si=bUPMLQ3UAacZ2mRt</a></p><p>If you prefer learning by watching and coding along, this will make things much clearer.</p><h4>What is Swagger?</h4><p>Swagger (via Swashbuckle in .NET) is a tool that automatically generates interactive API documentation.</p><p>With Swagger, you can:</p><ul><li>Test your API endpoints directly in the browser</li><li>See request and response formats</li><li>Share clear API documentation with clients or teammates</li></ul><h4>Step 1: Create a .NET 10 Web API</h4><p>Run the following commands:</p><pre>dotnet new webapi -n SwaggerDemo<br>cd SwaggerDemo</pre><h4>Step 2: Install Swagger (If Needed)</h4><p>Check if your .NET 10 project template already include Swagger.</p><p>On Visual Studio :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*6ScQqAPe0lb8w2CU0eGB-Q.png" /></figure><p>If not, install it manually:</p><p>Either on the Visual Studio Interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*Gxz-1XicO7y8t9PYA2e5Rg.png" /></figure><p>Or with type the following command on the Package Manager Console. Make sure to target the appropriate project.</p><pre>dotnet add package Swashbuckle.AspNetCore -Version 10.1.7</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1l69q-W5Lrwg__GeUEEz6Q.png" /></figure><p>Check the following : <a href="https://www.nuget.org/packages/Swashbuckle.AspNetCore">NuGet Gallery | Swashbuckle.AspNetCore 10.1.7</a></p><h4>Step 3: Configure Swagger in Program.cs</h4><p>Open your Program.cs file and make sure it looks like this :</p><pre>var builder = WebApplication.CreateBuilder(args);<br><br>// Add services to the container.<br>builder.Services.AddEndpointsApiExplorer();<br>builder.Services.AddSwaggerGen();<br><br>builder.Services.AddControllers();<br><br>var app = builder.Build();<br><br>// Configure the HTTP request pipeline.<br>if (app.Environment.IsDevelopment())<br>{<br>    app.UseSwagger();<br>    app.UseSwaggerUI();<br>}<br><br>app.UseHttpsRedirection();<br><br>app.UseAuthorization();<br><br>app.MapControllers();<br><br>app.Run();</pre><h4>Step 4: Open Swagger Automatically (Optional but Recommended)</h4><p>You can configure your app to automatically open Swagger when it starts.</p><p>Go to your Properties/launchSettings.json file and update your profile:</p><pre>&quot;launchBrowser&quot;: true,<br>&quot;launchUrl&quot;: &quot;swagger&quot;</pre><p>Now, every time you run your project, Swagger will open automatically in your browser.</p><h4>Step 5: Run Your Application</h4><p>Your browser should open automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fWzBx_9Cu8ghKvNn4IVYGw.png" /></figure><h3>Conclusion</h3><p>Enabling Swagger in .NET 10 is one of the simplest ways to improve your API development workflow.</p><p>With just a few lines of code, you get:</p><ul><li>Interactive API documentation</li><li>Faster development experience</li><li>Better collaboration with clients and teams</li></ul><p>If you’re building APIs with .NET, Swagger is a must-have tool, although alternatives do exist.</p><blockquote>I write about C#, .NET, and real-world backend development.<br>Follow for more practical insights.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad03e9d19451" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop NullReferenceExceptions in C# Before They Break Your App]]></title>
            <link>https://medium.com/@salomonakoa44/stop-nullreferenceexceptions-in-c-before-they-break-your-app-3f5d0610d3ff?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f5d0610d3ff</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 08:41:11 GMT</pubDate>
            <atom:updated>2026-04-01T08:41:11.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*pyhQG-7FgbTLLCkx2wxJzQ.png" /></figure><p>A <strong>NullReferenceException</strong> occurs when you try to access a member (method, property, index) of an object that is currently null.</p><p>If you’ve coded in C#, you’ve probably seen this error:</p><pre>System.NullReferenceException: Object reference not set to an instance of an object</pre><p>It’s a silent app killer. But there’s a simple habit that can save you hours: <strong>Null checks and the null-coalescing operator.</strong></p><p>Instead of this:</p><pre>Console.WriteLine(user.Name);</pre><p>Do this:</p><pre>Console.WriteLine(user?.Name ?? &quot;Unknown User&quot;);</pre><ul><li>The ?. operator safely navigates nulls.</li><li>The ?? operator gives a default value if null.</li></ul><p>Extra tip: Enable <strong>nullable reference types</strong> in your project. It forces the compiler to warn you about potential nulls before runtime.</p><p>Small changes like this make your apps <strong>safer, cleaner, and less crash-prone</strong>. Start using them today, and say goodbye to frustrating runtime errors.</p><blockquote>I write about C#, .NET, and real-world backend development.<br>Follow for more practical insights.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f5d0610d3ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C# Mistakes That Are Silently Slowing Down Your Code]]></title>
            <link>https://medium.com/@salomonakoa44/c-mistakes-that-are-silently-slowing-down-your-code-ad8435460649?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad8435460649</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 10:47:59 GMT</pubDate>
            <atom:updated>2026-03-30T10:47:59.831Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*b40jXDx45R10eJE-W55xeA.png" /></figure><p>Most C# developers don’t realize a thing. Your code might be working perfectly but still performing badly.<br>No errors. No crashes. Just slow.</p><p>Here are 5 common mistakes that quietly hurt your performance and how to fix them.</p><p><strong>1. Overusing </strong><strong>async / </strong><strong>await</strong></p><ul><li>async is powerful but not everything needs to be async.</li></ul><p>Wrong :</p><pre>public async Task&lt;int&gt; GetNumberAsync() <br>{ <br>  return 42; <br>}</pre><p>Better :</p><pre>public int GetNumber() <br>{ <br>  return 42; <br>}</pre><p><em>Only use async for :</em></p><ul><li>Database calls</li><li>API calls</li><li>File operations</li></ul><p><strong>2. Calling </strong><strong>.ToList() Too Early</strong></p><p>This one is very common with Entity Framework.</p><p>Wrong :</p><pre>var users = context.Users.ToList() .Where(u =&gt; u.IsActive);</pre><ul><li>This loads everything into memory first 😬</li></ul><p>Better :</p><pre>var users = context.Users .Where(u =&gt; u.IsActive) .ToList();</pre><ul><li>Let the database do the filtering not your app.</li></ul><p><strong>3. Ignoring </strong><strong>IQueryable vs </strong><strong>IEnumerable</strong></p><p>If you don’t understand this, performance will suffer.</p><ul><li>IQueryable → executes in the database</li><li>IEnumerable → executes in memory</li></ul><p>Mistake:</p><ul><li>Switching to IEnumerable too early.</li><li>Keep queries as IQueryable as long as possible.</li></ul><p><strong>4. Not Using </strong><strong>AsNoTracking() for Read-Only Queries</strong></p><p>By default, Entity Framework tracks everything. <br>Tracking = extra memory + slower queries.</p><p>Default :</p><pre>var users = context.Users.ToList();</pre><p>Optimized :</p><pre>var users = context.Users .AsNoTracking() .ToList();</pre><p><strong>5. Creating Too Many Objects</strong></p><p>Unnecessary object creation = more work for the garbage collector.</p><p>Example :</p><pre>for(int i = 0; i &lt; 1000; i++) <br>{ <br>  var service = new MyService(); <br>}</pre><ul><li>Reuse objects when possible, or use dependency injection properly.</li></ul><h4>Final Thoughts</h4><p>Performance issues in C# are often subtle. Your app works until it doesn’t scale. If you fix just these 5 mistakes, you’ll already be ahead of most developers.</p><blockquote><em>I write about C#, .NET, and real-world backend development.<br>Follow for more practical insights.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad8435460649" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Tech Blog: Starting Simple on Medium]]></title>
            <link>https://medium.com/@salomonakoa44/my-first-tech-blog-starting-simple-on-medium-fbdcf3b6053b?source=rss-4b14a6f3d9a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbdcf3b6053b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[tech-tutorials]]></category>
            <dc:creator><![CDATA[MBENGONO AKOA]]></dc:creator>
            <pubDate>Thu, 25 Sep 2025 08:48:37 GMT</pubDate>
            <atom:updated>2025-09-25T08:48:37.111Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIZRsiJfCV-A4Smbe45RWw.jpeg" /></figure><p>Hi everybody! I’m a developer just stepping into the blogging world, and I’m stoked to share my tech journey on Medium. I love playing around with code, especially when it comes to building websites and apps that feel fun and user-friendly. This first post is all about keeping things simple and diving into the basics of tech.</p><h3>Why Medium?</h3><p>Medium’s like the perfect coffee shop for tech fans, chill, welcoming, and full of people sharing cool ideas. I’m here to talk about the stuff I’m learning, like how to make a webpage look good with React.js or why Flutter is awesome for building apps. No jargon overload, just straightforward tips from my coding adventures.</p><h3>What’s Next?</h3><p>I’ll be writing about beginner friendly topics like how I figured out my first API, made a button actually <em>do</em> something, or fixed a bug that drove me nuts. Think of it as a peek into my coding notebook, with tricks I wish I knew when I started.</p><p>This is my first step, and I’m excited to learn from the Medium crowd and share what I discover. Let’s keep it simple and geek out together!</p><p><em>Follow me on Medium for more beginner tech tips.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbdcf3b6053b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>