公共类CustomSchemaFilters:ISchemaFilter { 公共无效Apply(Schema模式,SchemaFilterContext上下文) { var excludeProperties = new [] {“ name”,“ lastname”,“ Year”}; foreach(excludeProperties中的var prop) 如果(schema.Properties.ContainsKey(prop)) schema.Properties.Remove(prop); } }