Tag Archives: NHibernate

GridView, NHibernate and sorting

If you’re using an ASP.NET GridView with a custom DAL you might get this error when trying to sort the grid by clicking the column headers: The data source does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet. The web has some solutions to this problem, however [...]

Where’s the bug?

Where’s the bug? public virtual void RemoveOfferItems() { for ( int i = 0; i < offerItems.Count; i++ ) { OfferItem offerItem = offerItems[i]; log.Trace( “offer item: {0}, {1}”, offerItem.Id, offerItem.Description ); offerItems.Remove( offerItem ); offerItem.Delete(); } Save(); } But don’t write a test for this…

Follow

Get every new post delivered to your Inbox.