Jason,
>Dim fieldsObj As cFormFields
>Dim fieldEnt As cFormFieldsEntity
>
>For Each dr As DataRow In fieldsObj.DataSet.Tables(0).Rows
> fieldEnt = New cFormFieldsEntity
> With fieldEnt
> .SetDataRow(dr)
> Debug.Print(.Visible)
> End With
>Next
>
>Is there a syntax in MM.Net that resembles the first approach (#1 above)?
For now, the way you have shown is the best way to do this. The upcoming version of MM .NET (2.3) will make this a little easier for you by way of Generic lists. There is a new CreateEntityList() method on mmBusinessObject which creates a generic list of entity objects that have been hydrated with the DataRows from a DataTable. This new method returns a generic list of objects that you can then iterate through like this:
List<OrdersEntity> EntityList = this.CreateEntityList<OrdersEntity>();
foreach (OrdersEntity Order in EntityList)
{
CustomerID = Order.CustomerID;
}
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com