SvnBackup - Backup Tool For Subversion Repositories

Overview

The SvnBackup command line tool is used to create backup copies of your subversion repositories. The source code is the life blood of your application. Keeping the source repository backed up is major part in keeping your team going in case something goes wrong with your repository.

Features

  • Backup repository using hotcopy command
  • Backup folder management
  • Support repository parent directory
  • Keep x number of backups
  • Compress backups

Backup Process

SvnBackup follows the recommend way of backing up your subversion repository. While you can xcopy your repository, it may not always be the safest. SvnBackup automates the process by using svnadmin hotcopy command. The hotcopy command is the only safe way to make a backup copy of your repository.


Caching the results from LinqDataSource

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.


PLINQO - CodeSmith LINQ to SQL Templates

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 database schema without losing customizations. (See Safe Attributes)
  • Generation of the LINQ to SQL DataContext class.
  • Generation of the LINQ to SQL entity classes.
    • Generates one file per entity instead of one massive file.
    • Generates partial classes where custom code can be written and won’t be overwritten.
    • Generated entity files are added to the project as code behind files to their corresponding custom entity files.
  • Generation of entity manager classes.
    • Adds customizable business rules engine to enforce entity validation, business and security rules.
    • Provides access to common queries based on primary keys, foreign keys, and indexes.
    • Common queries are exposed as IQueryable so they can be extended.
  • All templates can be customized to meet your needs.

Read More


Easier way to page Linq queries.

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Linq
{
    public static class PageQuery
    {
         public static IQueryable<T> Paginate<T>(
            this IQueryable<T> query, int page, int pageSize)
        {
            int skip = Math.Max(pageSize * (page - 1), 0);
            return query.Skip(skip).Take(pageSize);
        }
    }
} 

Calculator.NET - Calculator that evaluates math expressions

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.