I have designed a database, in order to better demonstrate my question, I've simplified it:
TB: CONSULTANTS
ID uniqueidentifier
NAME NVARCHAR(30)
TB: EXPENSES
ID uniqueidentifier
AMOUNT money
CONSULTANTID uniqueidentifier
CONSULTANTID is FK from Consultants Table, simple right?
I have created a dataset with two Data Tables which are consultants and expenses
with corresponding queries such as get expenses by consultant id, etc
however, what i wanna display in grid view is:
Amount & Consultant's Name instead of Consultant Id
When I tried to return a data table with (ExpenseId, Amount, ConsultantName), it causes error since schema doesn't match with base data table EXPENSES (ExpenseId, Amount, ConsultantId).
What can I do to get (ExpenseId, Amount, ConsultantName(not id)) from BLL ?
Do I have to create another data table with joining two tables together?? because ASP.NET site says that's not a preferable way to create DAL and BLL
OR is that possible that I do some changes on gridview's BoundField (if that's possible, how to bind two different adapters' outputs together).