Knight Data Access Layer
Verify Mappings
Basic Tasks C# > Mapping > Verify Mappings

Use Mapper.VerifyMap or Mapper.VerifyNamespace to verify a single class or all the classes within a namespace against the actual tables and columns in the database.

 

Verify Map

IDataHelper db = DataHelper.SessionFactory();

db.Mapper.VerifyMap(typeof(Customer));

 

Verify Namespace

IDataHelper db = DataHelper.SessionFactory();

db.Mapper.VerifyNamespace("KellermanSoftware.Models");