private void CheckTypeIsModel() { if (this.HandleType.IsNotPublic) { throw new ModelException(this.HandleType, "The model class should be public."); } if (ClassHelper.GetArgumentlessConstructor(this.HandleType) == null) { throw new ModelException(this.HandleType, "The model need a public/protected(DbObjectModel) argumentless constructor"); } var list = new List <Type>(this.HandleType.GetInterfaces()); if (!list.Contains(typeof(IDbObject))) { throw new ModelException(this.HandleType, "The data object must implements IDbObject!"); } }