Microsoft Unity Succinctly
It’s here! My third book, Microsoft Unity Succinctly, has been released by Syncfusion!Again, it is part of the prestigious Succinctly series and this time the topic is my favorite IoC and DI framework,...
View ArticleEntity Framework Pitfalls: Non Public Entity Sets Setter
When defining your entity sets in a Code First context (DbContext), you declare your entity sets as properties of the DbSet<T> type. Weird as it may seem, these properties need to be declared...
View ArticleEntity Developer Review, Part 4
IntroductionThis is my fourth post on Entity Developer, Devart’s O/RM tool for NHibernate, Entity Framework and LINQ to SQL. The first post was an introduction to Entity Developer and a general...
View ArticleGenerating GDI+ Images for the Web
.NET’s Graphics Device Interface (GDI+) is Microsoft’s .NET wrapper around the native Win32 graphics API. It is used in Windows desktop applications to generate and manipulate images and graphical...
View ArticleMy MVP Blog
I started cross posting to my MVP blog, but you can continue following just this one because it will always be updated.
View ArticleNHibernate Pitfalls: Versioned Entities Are Not Batcheable
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here.This is a problem similar to the one with native id generators. Basically, because there are different...
View ArticleASP.NET Web Forms Prompt Validator
For those still using Web Forms and Microsoft’s validation framework, like yours truly - and I know you’re out there! -, it is very easy to implement custom validation by leveraging the CustomValidator...
View ArticleUnity, Part 9: Integration With Managed Extensibility Framework
This time, I will be talking about integrating Unity with Managed Extensibility Framework (MEF). You can find the other posts in the series here (how to use Unity in a web application), here (adding...
View ArticleLesser-Known NHibernate Features – Generating Database Scripts
As you may know, NHibernate knows how to generate the database for you from its model. Any of the supported databases will do.What you may not know is that you can simply generate the SQL scripts that...
View ArticleAdding Support for ISupportInitialize in NHibernate
The .NET ISupportInitialize interface is used when we want to support staged initialization for objects. Its BeginInit method is called when initialization is about to start and EndInit when it is...
View ArticleGetting the SQL for HQL and Criteria Queries
OK, so, I already showed how we can get the SQL that was generated from a LINQ query. Of course, we can do the same for both HQL and Criteria APIs as well (QueryOver is just a wrapper around Criteria,...
View ArticleLesser-Known NHibernate Features: Result Transformers
A result transformer, in NHibernate, is some class that implements the IResultTransformer interface: 1:publicinterface IResultTransformer 2: { 3: IList TransformList(IList collection); 4: Object...
View ArticleEntity Framework Pitfalls: Mapping Discriminator Columns
When you use a discriminator column, that is, a column that holds a value that tells Entity Framework what type the row refers to, or what restriction it shall use when querying the entity, you cannot...
View ArticleCustom Entity Framework Code First Convention for Discriminator Values
Since version 6, Entity Framework Code First allows the injection of custom conventions. These conventions define rules that will be applied by default to all mapped entities and properties, unless...
View ArticleSQL Server Auditing
Probably the best mechanism for auditing changes to tables in SQL Server is Change Data Capture, which I already covered here. Unfortunately, it only works with the Enterprise editions of SQL Server,...
View ArticleEntity Framework Pitfalls: Command Interceptors and Identity Keys
The IDbCommandInterceptor (sorry, no official documentation) interface was introduced in Entity Framework 6 as part of the new interception and logging API, and allows the interception of the SQL and...
View ArticleLesser-Known NHibernate Features: Filtering an Unloaded Collection
Suppose you have an entity with a collection of other entities (one to many, many to many); this collection is normally represented by some property implementing IEnumerable<T>, or one some more...
View ArticleUnity, Part 10: Custom Build Strategies
IntroductionWe’re getting there! This time, custom build strategies, or how you can tell Unity to build/act upon built objects in different ways.The latest post in the series was on integration with...
View ArticleLearning Microsoft Azure Review
IntroductionI was recently asked by Packt Publishing to do a review of their title Learning Microsoft Azure, and so I did.It wasn’t the first time I did a review on an Azure book, I also reviewed...
View ArticleLesser-Known NHibernate Features: Versioning and Optimistic Concurrency
NHibernate supports the notion of entity version. An entity version is the value of some entity property that is mapped as versioned. There are several strategies for versioning:A numeric counter;The...
View Article