My development team ran into a design problem. I hope someone can help me clear this part of the architecture a bit.
In my system, I have an enumeration with 250 members [one member is a separate snapshot]. To fill in the drop-down lists in any window, this form sends enumeration elements that are associated with the necessary drop-down lists to the items and the drop-down information is returned.
In other words, say, for example, we have 3 windows. Window A has drop-downs X, Y and Z. Window B has drop-down lists W, X and Y, and window C has drop-down lists T, U and W. My DropDownType enumeration will consist of T, U, W, X, Y, Y, and Z. Thus, for the specified window, given the pop-ups in this window, I request that the data appear in these drop-down lists.
This is a simplified example because my application consists of> 250 separate drop-down lists.
As you can imagine, I have a factory setting to return data for each drop-down list. And this factory is called down for each requested request.
switch (dropDownType)
{
case DropDownType.T:
return (from t in dataContext.GetTable<TableOne>()
select new DropDownDto
{
DropDownDisplayName = t.ColumnA,
DropDownValue = t.ColumnB
}).ToList();
case DropDownType.U:
return (from u in dataContext.GetTable<TableTwo>()
select new DropDownDto
{
DropDownDisplayName = u.ColumnC,
DropDownValue = u.ColumnD
}).ToList();
}
, - ? , factory ( 250 ...)? , ? HUGE .
. !