-
Consider this hypothetical: You need to track different ways it is permissible to contact a customer.Or perhaps there are multiple attributes you wish to attach to an entity. Further, perhaps you want to define new attributes that can vary from entity to entity. From a database perspective, this can present a thorny problem. Fortunately, indexers in C# provide an elegant solution to the problem. In this article, I will show you how to use indexers to expand an organizati...See More
-
It is often said that ASP.NET MVC was inspired by Rails. What better way to test that assertion than by writing the Nerd Dinner ASP.NET MVC application in Rails? In this article, I’ll take you through the steps I used to get Nerd Dinner up and running in Rails. A few points to keep in mind:
-
Take advantage of the best relational databases and object-oriented design have to offer without compromising either.Using an object/relational mapping framework like NHibernate, you can significantly reduce the amount of code you write (and therefore potential bugs) for performing standard operations against your database and save the heavy ADO.NET coding for the complicated scenarios.
-
Chad Myers explains how to map and work with one-to-many relationships in NHibernate, using a Customer and its SalesOrderHeader as an example, and outlines the best ways to choose and configure collection types (bag, set, list, map, array) for OTM relationships. He covers bi-directional mappings with inverse, how to persist and synchronize in-memory collections, and the role of lazy loading, cascading, and performance considerations (batching, ordering, and filtering) in...See More

