aloker

Stories submitted by aloker

Anonymous type to dictionary using DynamicMethod(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

C# 3.0 offers a variety of new language features like anonymous types, object and collection initializers and extension methods. With some creativity these features can be used to reduce the amount of code being written and to make the code more readable. This article describes an efficient(!) way to convert an anonymous type to a dictionary. read more...

add a comment |category: |Views: 178

tags: another

Access to MonoRail service instances(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Describes how to access common MonoRail services like email formatting & sending. read more...

add a comment |category: |Views: 2

tags: another

sizeof(char) vs SizeOf(char)(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

This is weird. sizeof(char) != Marshal.SizeOf(typeof(char)) Here's why! read more...

add a comment |category: |Views: 10

tags: another

NHibernate: counting database queries per web request(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Describes how to count the number of database queries made by NHibernate using a simple trick. read more...

add a comment |category: |Views: 28

tags: another

The beauty of fluent interfaces(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

I notice that more and more frameworks, toolkits and libraries use fluent interfaces. This article gives examples on how FIs can improve usability of an API and show possible pitfalls. read more...

add a comment |category: |Views: 458

tags: another

Haml for MonoRail(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

HAML is an abstraction language for HTML. For ASP.NET MVC support for it is already being made. I'd really like it for MonoRail, too. read more...

add a comment |category: |Views: 10

tags: another

HttpApplication instances(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Describes how and when HttpApplication instances are created by ASP.NET and gives related hints. read more...

add a comment |category: |Views: 22

tags: another

MonoRail and Windsor integration(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Although the procedure of enabling Windsor Container integration is explained quite well in the documentation, I ran into some trouble today. As required by the Windsor integration I made my HttpApplication instance implement IContainerAccessor, created a WindsorContainer instance in Application_Start and returned that instance in the Container property. Still the MonoRail runtime was complaining: The container seems to be unavailable in your HttpApplication subclass. Here's how I fixed it. read more...

add a comment |category: |Views: 14

tags: another

Why dependency injection rocks(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Describes how dependency injection using an inversion of control (IoC) container can simplify development. read more...

add a comment |category: |Views: 42

tags: another

MonoRail, AspView and ReSharper: skip ViewAtDesignTime(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

AspView is a MonoRail viewengine which provides compile time checking of views and Intellisense support in Visual Studio. The latter is achieved by using the known ASP.NET WebForms syntax to define views. This article describes how to improve Intellisense for AspView. read more...

add a comment |category: |Views: 5

tags: another

NHibernate: hiding ID setters(blog.andreloker.de)

submitted by alokeraloker(1810) 3 years, 11 months ago

Encapsulation is a key concern in object oriented development. Sometimes you have to break encapsulation a bit to make your code interoperable with the infrastructure. In this article I explain how to make a domain entity play well with NHibernate while keeping an encapsulated interface towards the user. read more...

add a comment |category: |Views: 16

tags: another