use ICollection in generated code