So hopefully the title makes a little sense, but I'll explain a little more.
Currently I am developing a program at work that is designed to query a SQL database for results. The code is meant to be stand alone, a single .exe that can be run on any machine. Now, I want to improve the logic of these queries a little, which after talking with a co-worker, have determined a CLR function would be perfect. The thing is, I have never done CLR before.
I have been searching the net for it, and the idea behind it seems pretty straight forward. However, here's the kicker.
The program I am working on, I want to write the CLR function within the code, and be able to SQL queries in the same program using that CLR function. The servers I am going to be querying against will have CLR Integration enabled, so I don't have to worry about that.
The problem is, I have no clue how to go about doing this. The program is meant to be lightweight, aka a single exe. I don't want to start extracting files everywhere with this. Also, it needs to be able to run on any machine, and communicate with the SQL Server.
So how would I go about achieving the goal listed above. If I could build a project and somehow load the assembly into memory that the SQL could use it that would be great. But remember, the SQL queries I am running are within the same solution as the where I want to develop the CLR function.
Any help would be greatly appreciated. I am not exactly sure what the proper terming is or logic behind what I am trying to do, which is making it hard to search for.
Thanks