How to write this in better way?
- by dario
Hi all.
Let's look at this code:
IList<IHouseAnnouncement> list = new List<IHouseAnnouncement>();
var table = adapter.GetData(); //get data from repository object -> DataTable
if (table.Rows.Count >= 1)
{
for (int i = 0; i < table.Rows.Count-1; i++)
{
var anno = new HouseAnnouncement();
anno.Area =…