NLog MongoDB Library

Writes NLog messages to MongoDB.

Download

The NLog.Mongo library is available on nuget.org via package name NLog.Mongo.

To install NLog.Mongo, run the following command in the Package Manager Console

Install-Package NLog.Mongo

Configuration Syntax

<extensions>
    <add assembly="NLog.Mongo"/>
</extensions>

<targets>
    <target xsi:type="Mongo"
            name="String"
            connectionName="String"
            connectionString="String"
            collectionName="String"
            cappedCollectionSize="Long"
            cappedCollectionMaxItems="Long"
            includeDefaults="Boolean">
    
    <!-- repeated --> 
    <field name="String" Layout="Layout" />
    
    <!-- repeated --> 
    <property name="String" Layout="Layout" />
    </target>
</targets>

Parameters

General Options

name - Name of the target.


Entity Framework Batch Update and Future Queries

Entity Framework Extended Library

A library the extends the functionality of Entity Framework.

Features

  • Batch Update and Delete
  • Future Queries
  • Audit Log

Project Package and Source

NuGet Package:

Install-Package EntityFramework.Extended

Batch Update and Delete

A current limitations of the Entity Framework is that in order to update or delete an entity you have to first retrieve it into memory. Now in most scenarios this is just fine. There are however some scenarios where performance would suffer. Also, for single deletes, the object must be retrieved before it can be deleted requiring two calls to the database. Batch update and delete eliminates the need to retrieve and load an entity before modifying it.


Optimize LINQ to SQL with PLINQO Futures

PLINQO future queries are a way to defer query execution until it is needed. The difference between standard IQueryable deferred queries and future queries is that the future queries are batched up and executed in a single round trip to the database.

Read more at PLINQO.com


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.