There are 6 things you need to do before you can capture the SQL Query generated by NHibernate at runtime. Create a class to store the NHibernate generated SQL Query Create an Interceptor class that implements the IInterceptor interface Implement the OnPrepareStatement method and set the NHibernate generated SQL Query created in step 1 Set […]
Read More →Category: C# Blogs
Hashing with Cryptography and SHA in C#
Disclaimer: Security is a very important aspect, not only for a computer system, but for an entire organization and/or company. Different types of organizations store different types of data which have different types of security requirements. My suggestion is to always consult a security expert with experience in your domain prior to implementing a security […]
Read More →.Net Framework 4.6.2 not in Visual Studio 2017
Cannot find the .NET Framework 4.6.2 in Visual Studio 2017? Without it you cannot get all the cool new C# features? When you create a new project for example, you may only see .NET Framework versions up to 4.6.1 as seen in Figure 1. Figure 1, where is 4.6.2 in Visual Studio 2017 This is […]
Read More →Order by with LINQ to Reflection using MetadataToken and Lambda in C#
DISCLAIMER: Most if not all of the methods used with Reflection do not return their result in neither alphabetical or declaration order. This is clearly stated within the MSDN library remarks for the reflection methods. If you can avoid designing based on an expected order of results from any Reflection method, that would be best […]
Read More →Online SQL Formatter for ORM generated SQL
With the recent introduction of so many ORM’s (Object-relational mapping) tools onto the market it is becoming less and less needful to write SQL statements. Tools like NHibernate, Entity Framework and SubSonic to name a few will take your database mappings and write an optimized query for you. However, during development, testing or production support […]
Read More →Add a DataGrid to Silverlight using C#
I recently completed a project using WPF and along the way I read up some on Silverlight. I was reading that you could simply convert your MainWindow.xaml file to a MainPage.xaml. Of course this depends on the complexity of your MainWindow.xaml file. I believe it is a known fact that programs written for the installation […]
Read More →How I called an asynchronous method from a loop
Check out some of my other articles I wrote in reagrds to ASP.NET Core and .Net Core How to call an async method from a console app main method How to deploy a .NET Core console application to Azure, WebJob .NET Core application, where is my EXE, how to publish Create a VNET and access […]
Read More →How I improved my chatbot
I think a common attribute of a hardcore coder is procrastination. Up to now I have brainstormed my LadyBug but have not done much coding to support the backend. Nonetheless, this is probably my last blog on the design of my #chatbot and will start coding it pretty soon. If you haven’t seen my other […]
Read More →Using LINQ with Reflection in C#
Reflection is used to read meta data from a .Net assembly. For example, if you what to find all the method inside of a .dll, you can use Reflection to do it. You can also load and execute the method. I find it an interesting concept that we have the capability to search and use […]
Read More →Recursively traverse an XML document using the Action delegate in C#
I was lucky enough to be able to develop a relatively complicated recursive process twice. They didn’t do exactly the same same and were different enough that I was not able to reuse the first implementation completely. What I had to do was build a treeview from a hierarchy of data and reflection objects, capture […]
Read More →