Quantcast
Channel: Real Web Developers
Browsing latest articles
Browse All 14 View Live

ASP.Net MVC avoiding magic strings at all costs

Like most developers we all like to avoid magic strings wherever possible. One place that we found to be littered with these magic strings is our controllers and to a lesser but still notable extent...

View Article



NHibernate POCO classes expose read-only collection

The C# standard for exposing a read-only collection is to use the ReadOnlyCollection<T> type from the System.Collections.ObjectModel namespace but NHibernate doesn't play with this type at all....

View Article

Using CSS to insert dividers into primary navigation

We wanted to have a primary navigation with a > seperator but didn't want the work of creating a (non-scaling) background image for the items. So we took our clean HTML<!DOCTYPE...

View Article

EPiServer CMS 7 MVC Basic custom page type pattern

To create a custom page type for EPiServer CMS v7 using MVC we needed to create four files; the page type itself (marked with the EPiServer.DataAnnotations.ContentType attribute and inheriting...

View Article

EPiServer CMS 7 MVC Get child pages of specific type

Since we have all our views built on view models (and not our business entities) we often need to pass collections of child view models into the parent view model. In EPiServer CMS everything is a page...

View Article


EPiServer CMS 7 MVC Notes

Create a new page in codeTo create a new page as a child of a specific pagenamespace Website.Plugins { using EPiServer; using EPiServer.Core; public class DataImportJob { public static OperationResult...

View Article

Locking records for Save, Update and, Delete operations with your entity manager

So we need to be able to know that an entity is locked before we Save, Update or, Delete it and we need to know that this lock is exclusive. We have a System.Tuple keyed with a Guid that represents the...

View Article

NHibernate POCO classes - modify collection property

If you read our article NHibernate POCO classes expose read-only collection you will know that all our domain types expose only read-only collection properties by returning IEnumerable<T> as the...

View Article


Extend NHibernate to support DateTime.AddDays()

Over the weekend we tried to include the DateTime.AddDays() function in an Expression<Func<T, bool>> passed to NHibernate.Linq. This threw a NotSupportedException. So we had to implement...

View Article


ASP.net MVC tips, tricks and, hidden gems

Lowercase generated URLsIn Global.asaxpublic static void RegisterRoutes(RouteCollection routes) { ... routes.LowercaseUrls = true; ... }This makes all generated URLs lowercase (rather than the default...

View Article
Browsing latest articles
Browse All 14 View Live




Latest Images