0

in my expense class, branch id is a foreign key. to display I got data from Sql about expense detail along branch id, branch description. Trying to set virtual property (branch) with branch description.

enter image description here

enter image description here

1 Answers1

0
Branch branch = new Branch();
branch.Oid = (int)reader["br_oid"];
branch.Description = (string)reader["br_description"];
expense.Branch = branch;

solved my problem.