Posted by Paul Welter on Wednesday, January 14 2009 at 11:19 AM

Over the weekend I setup Graffiti CMS for my website.  Creating a theme was very easy.  One of the easiest theme engines.  It had been a very long time since I’ve made any updates to LoreSoft.com.  Hopefully the new site will make it easier to get content added. 

Read More ...

No Comments Posted in: Personal    Tagged as: ,
Posted by Paul Welter on Monday, August 13 2007 at 3:24 PM

I wanted to be able to cache the results of a query from the LinqDataSource that was used in multiple places on the page.  I whipped up this little class to do the work of caching for me.  The class, LinqCacheDataSource, handles the Selecting and Selected events.  The Selected handler inserts the result of the query into cache.  The Selecting handler gets the result from the cache.  If it doesn't find the result, the query runs as normal.  The caching will only work for selecting data.  It works great for dropdowns and other fairly static data.

Read More ...

No Comments Posted in: Snippets    Tagged as: ,
Posted by Paul Welter on Friday, August 10 2007 at 12:36 PM

PLINQO, which stands for Professional LINQ to Objects, is a collection of CodeSmith templates that are meant to replace and extend the LINQ to SQL designers that are included with Visual Studio 2008. Features Generate or update a LINQ to SQL dbml file from a database schema. Includes all tables, stored procedures, functions, and views with the ability to exclude objects based on regex patterns. Ability to automatically remove object prefix and suffixes (ie. tbl_ and usp_). Dbml file can still be customized with the normal Visual Studio 2008 designer. Dbml file can be refreshed based on the current...

Read More ...

No Comments Posted in: Projects / CodeSmith    Tagged as: , , ,
Posted by Paul Welter on Thursday, May 31 2007 at 5:48 PM

The following query extension will make paging a query more natural then skip and take. Simply append Paginate(page, pageSize) to your query.

Read More ...

No Comments Posted in: Snippets    Tagged as: ,
Posted by Paul Welter on Saturday, May 05 2007 at 4:38 PM

I'd like to announce the release of a little project I've been working on. I call it Calculator.NET. I started this project for a couple reasons. First, I was annoyed that Windows Vista doesn't come with a better calculator. Windows XP has Power Calculator, but that doesn't work on Vista. Next, I was reading a blog about DynCalc by Bart De Smet on how to do mathematical calculations. That gave me the starting point on how to create Calculator.NET. As part of the project, I created a MathExpressions library that does the bulk of work. The library supports math expressions, functions unit conversion...

Read More ...

6 Comments Posted in: Projects / Calculator.NET    Tagged as: ,
Posted by Paul Welter on Thursday, October 19 2006 at 11:24 AM

CodeSmith 4.0 Beta 2 has been released and is now available to the public. Here are just a few the new capabilities in CodeSmith 4.0: CodeSmith Projects (.csp) - This feature makes automating your code generation process really easy and consistent whether you are working from inside of Visual Studio 2005, MSBuild, Windows Explorer, a command line / batch file, or CodeSmith itself. ActiveSnippets - Imagine Visual Studio 2005 snippets, but with the full power of CodeSmith available to execute any logic or access any complex metadata (including database schema and xml data) to control the output of...

Read More ...

No Comments Posted in: Projects / CodeSmith    Tagged as:
Posted by Paul Welter on Wednesday, May 03 2006 at 12:13 PM

For some reason, the generic Dictionary in .net 2.0 is not XML serializable.  The following code snippet is a xml serializable generic dictionary.  The dictionary is serialzable by implementing the IXmlSerializable interface.

Read More ...

No Comments Posted in: Snippets    Tagged as: , ,
Posted by Paul Welter on Tuesday, April 04 2006 at 12:47 AM

The following CodeSmith templates are to generate the WilsonORMapper mapping file and to generate the business classes that can be mapped to. These templates have the following features... Converts plural table names to single tense class names Cleans table names to make legal class names Column name cleaning Support for all relationships including many to many Template based, easily changed to meet needs Support for Visual Basic and C# Merge support Update:   These templates are now included with CodeSmith....

Read More ...

2 Comments Posted in: Projects / CodeSmith    Tagged as: , ,
Posted by Paul Welter on Friday, March 31 2006 at 3:15 PM

Announcement The MSBuild Community Tasks Project releases version v1.1.0.145. There are many new tasks in this release. Special thanks to all the contributors to the project. Current Community Tasks Task Description AppPoolController Allows control for an application pool on a local or remote machine with IIS installed. AppPoolCreate Creates a new application pool on a local or remote machine. AppPoolDelete Deletes an existing application pool on a local or remote machine. AssemblyInfo Generates an AssemblyInfo file using the attributes given. Attrib Changes the attributes of files and/or directories...

Read More ...

No Comments Posted in: Projects / MSBuild Tasks    Tagged as: ,
Posted by Paul Welter on Wednesday, February 08 2006 at 1:38 AM

Here is a code snippet that is equivalent to the windows API PathRelativePathTo as native c#. The function creates a relative path from one file or folder to another.

Read More ...

No Comments Posted in: Snippets    Tagged as: , ,