bengtbe

Stories submitted by bengtbe

NerdDinner with Fluent NHibernate Part 3 - The infrastructure(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 7 months ago

This is the final post in a series of three where I'm going to see how we can change the NerdDinner project to use Fluent NHibernate instead of LINQ to SQL. In this post we are going to take a look at the Nhibernate infrastructure and the dinner repository. read more...

add a comment |category: |Views: 293

tags: another

Auto-mocking hierarchies (a.k.a. recursive mocks) with Moq(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 9 months ago

In this post I will show how the auto-mocking hierarchies (a.k.a. recursive mocks) feature of Moq can greatly simplify your unit tests. read more...

add a comment |category: |Views: 39

tags: another

NerdDinner with Fluent NHibernate Part 2 - The mapping(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 9 months ago

This is the second post in a series of three where I'm going to see how we can change the NerdDinner project to use Fluent NHibernate instead of LINQ to SQL. In this post we are going to take a look at the mappings. read more...

add a comment |category: |Views: 83

tags: another

NerdDinner with Fluent NHibernate Part 1 - The domain model(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 9 months ago

This is the first post in a series of three where I'm going to see how we can change the NerdDinner project to use Fluent NHibernate instead of LINQ to SQL. In the first post we are going to take a look at the domain model. read more...

add a comment |category: |Views: 391

tags: another

DotNetShoutout and DotNetKicks extensions for BlogEngine.NET(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 10 months ago

At the end of every .NET post I include counter buttons to DotNetKicks and DotNetShoutout. At first I manually created these buttons by copying some code from these sites after the post was submitted to them, however this quickly became tiresome. Now I just write kickit and shout at the end of the post to get these buttons. read more...

add a comment |category: |Views: 13

tags: another

Use specific return types in your ASP.NET MVC action methods(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 10 months ago

When looking at ASP.NET MVC examples on the web almost all action methods return ActionResult, even methods that could return a specific subclass... read more...

2 comments |category: |Views: 311

tags: another

Book review: NHibernate in Action(bengtbe.com)

submitted by bengtbebengtbe(470) 2 years, 11 months ago

In this post I review the book NHibernate in Action from Manning Publications. As far as I know this is the only book that solely covers the Object/Relational Mapper NHibernate. read more...

add a comment |category: |Views: 35

tags: another

Mapping a Twitter like domain with Fluent NHibernate(bengtbe.com)

submitted by bengtbebengtbe(470) 3 years ago

I'm currently learning NHibernate, and one of the best ways to learn is to blog about it :) Since I'm not a big fan of XML files, I also wanted to use Fluent NHibernate to do the mapping. As an example I will use a social messaging domain, similar to Twitter. I will also use a Top-down approach, starting with the domain model, writing the mapping, and finally creating the database schema using the SchemaExport class in NHibernate. read more...

add a comment |category: |Views: 39

tags: another

Using AutoMapper to map view models in ASP.NET MVC(bengtbe.com)

submitted by bengtbebengtbe(470) 3 years, 1 month ago

Mapping code between Domain Models and Data Transfer Objects/Presentation Models is often boring and tedious to write, so when I first read about AutoMapper it triggered my interest. This post takes a first look at AutoMapper, and show how it can be used to map a complex domain model to a view model in an ASP.NET MVC application. read more...

add a comment |category: |Views: 862

tags: another

Book Review: MS .NET: Architecting Applications for the Enterprise(bengtbe.com)

submitted by bengtbebengtbe(470) 3 years, 2 months ago

Review of the Microsoft Press book "Microsoft .NET: Arhitecting Applications for the Enterprise" by Dino Esposito & Andrea Saltarello. A must read for both intermediate and senior .NET developers. read more...

add a comment |category: |Views: 16

tags: another

Eliminating ToList().ForEach() by TDD and Extensions Methods(bengtbe.com)

submitted by bengtbebengtbe(470) 3 years, 2 months ago

Following "Program to an interface, not an implementation", you should use IList instead of List. However, you then lose access to some great delegate methods of the List class (e.g. ForEach, ConvertAll). In order to use them you have to first call ToList(). In this post I will use Test Driven Development (TDD) to add these as extension methods to the generic IEnumerable interface, elimintating the need to call ToList(). read more...

add a comment |category: |Views: 133

tags: another

Using StructureMap with the ASP.NET MVC framework(bengtbe.com)

submitted by bengtbebengtbe(470) 3 years, 2 months ago

This is my first blog post ever :) In it I will try to show you how to use StructureMap with the new ASP.NET MVC framework. You will need to have some basic knowledge about the ASP.NET MVC framework and Dependency Injection (DI)/Inversion of Control (IoC). The method described is not limited to StructureMap; if you prefer, you can of course use another DI/IoC tool. I hope someone on this site finds it useful. read more...

add a comment |category: |Views: 267

tags: another