Linq To Sql

Verifying Entity Mapping using Linq-to-SQL

One of the things I enjoy about using FluentNHibernate is the PersistenceSpecification class VerifyMapping method which allows me to verify that my database schema, mapping and domain are in sync. When using other ORMs I tend to recreate this feature. Working with one client recently who uses Linq-to-SQL I did it again and decided it is time to share it: If you have an base class or interface for entities that defines a common identifier then you can cut out the identity expression.