Given an Entity with a 1:N relationship, you can reference properties of the entity to get back the items in that relationship:
MyEntity entity = new MyEntity(1);
Grid.DataSource=entity.MyNCollection;
If I want the collection to be sorted by some particular field, so I do this:
MyEntity entity = new MyEntity(1);
entity.SetCollectionParametersMyNCollection(0, new SortExpression(MyNFields.SomeField));
Grid.DataSource=entity.MyNCollection;
And that works fine. However, for 99% of all consumers of this collection, it should be sorted by 'SomeField' and I would like to default it to that, so when the Entity is created that sort is setup by default. Ideally, this would be something you setup in the LLBLGen GUI designer. However, since that feature is not available, I wanted to just set that sort when the MyEntity is created. There are no 'user code' sections in the constructors for the class - where is the best place to set something like this up?