<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>C# on Soma Mbadiwe</title>
    <link>https://smbadiwe.github.io/tags/c%23/</link>
    <description>Recent content in C# on Soma Mbadiwe</description>
    <generator>Hugo -- 0.151.0</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 04 Mar 2026 16:30:00 -0500</lastBuildDate>
    <atom:link href="https://smbadiwe.github.io/tags/c%23/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>From Python to .NET: A Focused Guide for the Almost-Beginner</title>
      <link>https://smbadiwe.github.io/post/python-to-dotnet-guide/</link>
      <pubDate>Wed, 04 Mar 2026 16:30:00 -0500</pubDate>
      <guid>https://smbadiwe.github.io/post/python-to-dotnet-guide/</guid>
      <description>A focused, no-fluff guide for someone with basic Python experience who needs to start building software on the .NET platform. Covers the mental model shift, the tools, the learning path, and the pitfalls to avoid.</description>
    </item>
    <item>
      <title>Cannot call action method on controller because the action method is a generic method</title>
      <link>https://smbadiwe.github.io/post/cannot-call-action-method-on-controller/</link>
      <pubDate>Wed, 02 Jan 2019 09:04:15 +0000</pubDate>
      <guid>https://smbadiwe.github.io/post/cannot-call-action-method-on-controller/</guid>
      <description>&lt;p&gt;I have been living my life writing web apps with MVC5 until I ran into this weird problem. It happened because I put a generic method in my controller (I had a base controller, but that&amp;rsquo;s by the way). I implemented some functionalities using &lt;a href=&#34;https://en.wikipedia.org/wiki/Command_pattern&#34;&gt;Command Pattern&lt;/a&gt; and thought I could retrieve my command handler within a controller using the simple call:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cs&#34; data-lang=&#34;cs&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;handler&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;CommandHandler&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;handler&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Handle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Well, I got the error: &lt;code&gt;Cannot call action method on controller because the action method is a generic method&lt;/code&gt;. So I ended up writing a solution where I now call&lt;/p&gt;</description>
    </item>
    <item>
      <title>C# - How To Get Logged In User&#39;s Username and Track Activities from Windows Service</title>
      <link>https://smbadiwe.github.io/post/track-activities-windows-service/</link>
      <pubDate>Wed, 02 Jan 2019 08:39:09 +0000</pubDate>
      <guid>https://smbadiwe.github.io/post/track-activities-windows-service/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve ever looked at Windows Event Logs, you must have noticed that it logs too many information, most of which are not useful when you&amp;rsquo;re actually trying to do some kind of forensics. To reduce this noise, I went to build a proof-of-concept Windows Service whose only task is to log users&amp;rsquo; session activities (Lock, Unlock, Logout, Login, etc) in a different place, thus giving me a much smaller log file to dig through.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Migrate Your Data From Shared Hosting Server To Your System</title>
      <link>https://smbadiwe.github.io/post/migrate-data-shared-host-nh/</link>
      <pubDate>Wed, 02 Jan 2019 07:01:08 +0000</pubDate>
      <guid>https://smbadiwe.github.io/post/migrate-data-shared-host-nh/</guid>
      <description>&lt;p&gt;Sometime ago, I built an ASP.NET site for a client and hosted it on &lt;a href=&#34;https://www.godaddy.com/hosting/windows-hosting&#34;&gt;GoDaddy public shared server&lt;/a&gt;. Soon enough, the need arose to back up all data generated periodically. Even though &lt;a href=&#34;https://www.godaddy.com/help/back-up-databases-19972&#34;&gt;GoDaddy offers database backup&lt;/a&gt;, we did not have extra cash for that, so I had to innovate, creating a solution that connects to the server and brings down my data from some or all my tables whenever I want them, at no cost. The rest of the post is a summary of what I did. Use it as a guide if you are in a situation similar to the one I described above.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VS 2017 Error: The specified task executable &#34;sgen.exe&#34; could not be run. The filename or extension is too long.</title>
      <link>https://smbadiwe.github.io/post/sgen-could-not-be-run/</link>
      <pubDate>Wed, 02 Jan 2019 06:43:40 +0000</pubDate>
      <guid>https://smbadiwe.github.io/post/sgen-could-not-be-run/</guid>
      <description>&lt;p&gt;OK, I admit this error tripped me off.&lt;/p&gt;
&lt;p&gt;If it were a file I created, I would have simply moved things around to reduce the filename length. But the error was coming from Visual Studio, specifically, from &lt;code&gt;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And, &lt;code&gt;sgen&lt;/code&gt;: what&amp;rsquo;s that?&lt;/p&gt;
&lt;p&gt;It turns out sgen is just an XML serializer generator - something I clearly don&amp;rsquo;t use or need. The &lt;code&gt;.targets&lt;/code&gt; file above contained a task referencing &lt;code&gt;Sgen&lt;/code&gt;. So, what now: comment it out?&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
