Using VSDropAssist to Easily Add Many Columns
- Select multiple columns in the Solution Explorer
- Drag them to the code, and before you drop, click the Shift key
- The Columns Will be Automatically added to your code
public class DemoColumnsCollection : UIControllerBase
{
public readonly Models.Orders Orders = new Models.Orders();
public readonly Models.Customers Customers = new Models.Customers();
public readonly DateColumn EndOfMonth = new DateColumn("EndOfMonth");
public DemoColumnsCollection()
{
From = Orders;
Relations.Add(Customers, Customers.CustomerID.IsEqualTo(Orders.CustomerID));
Columns.Add(Orders.OrderID);
Columns.Add(Orders.CustomerID);
Columns.Add(Orders.OrderDate);
Columns.Add(Orders.RequiredDate);
Columns.Add(Orders.Freight);
Columns.Add(Orders.ShipName);
Columns.Add(Orders.ShipAddress);
Columns.Add(Orders.ShipRegion);
Columns.Add(Orders.Ship Country);
}
public void Run()
{
Execute();
}
protected override void OnLoad()
{
View = () => new Views.DemoColumnsCollectionView(this);
}
}
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com