Search
Code Better
-
Recent Posts
Categories
Category Archives: Platform
Configuring NLog for WCF Services
NLog didn’t cooperate for my WCF services (server side). I finally did manage to get it working, with a few extra steps; this post outlines how to configure NLog to work with WCF services. Continue reading
SQL Server Indexed Views and View Performance
SQL Server allows you to index views, which caches the results; what’s more, indexed views may automatically be included in queries at SQL Server’s discretion — no application changes required. Wow! Continue reading
Visual Studio Automatic Version Numbering
Visual Studio (2010+) allows you to specify that it should generate (incremental) build versions for your projects. The syntax is quite simple (for AssemblyInfo.cs), but there are a few caveats to know. Continue reading
Posted in Silverlight, Tools, Web, Wndows Forms, WPF
Tagged assembly versions, visual studio, visual studio 2010
Leave a comment
Finding Circular Dependencies in SQL Server
SQL Server doesn’t allow a cycle of foreign keys, nor two or more paths to cascadingly delete rows from a table. Thankfully, there’s a script you can use to detect at least table reference cycles. Continue reading
Posted in Libraries, Web, Wndows Forms, WPF
Tagged Cascade, Foreign Keys, SQL Server
Leave a comment
Rails-Style Test Database Creation in ASP.NET MVC
How can you get ASP.NET MVC to create your database on the fly for tests? Well, you can, if you use migrations for your application to build the tables, drop and recreate all the tables prior to running any tests. Continue reading
Testing Rendered HTML in ASP.NET MVC3
HtmlUnit and IKVM together give you the power to test your ASP.NET MVC3 application. Submit forms, and even verify the resulting HTML! All with a little help from Java, and Steve Anderson. Continue reading
Posted in Libraries, Web
Tagged HtmlUnit, IKVM, integration testing, java, unit testing
Leave a comment
Integrating NUnit with CruiseControl.NET
Interested in using CruiseControl.NET to execute NUnit tasks and integrate the results in the dashboard, without using the nunit task type? You can do it through exec, if you merge the results. This article outlines how. Continue reading
Fetching Connection Strings from App.Config in a Library via ConfigurationManager
System.Configuration.ConfigurationManager doesn’t (easily) allow you to read connection strings from an App.Config file inside a library. You need to add a few extra steps to pull this off, like using KeyValueConfigurationElement. Continue reading
Posted in Core .NET, Web, Wndows Forms
Tagged app.config, connection strings, database
Leave a comment
Using NInject For Compile-Time AOP
An update to my aspect-oriented design pattern for compile-time checking: you can implement aspects as interfaces with singular implementations, and use Ninject to inject the interface implementations. Smooth, easy, and it works! Continue reading
Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF
Tagged aspect-oriented programming, dependency injection, design patterns
Leave a comment
Creating Background Applications in C#
How can you create a .NET application that runs in the background, without a console or any forms? Just create a Windows Application type application, and make sure no windows appear. That’s it! Continue reading