Two methods:
var books = _myIBookRepository.RetrieveAllBooks();
var bokexamples = _myIbokexamples Repository.RetrieveAllBookExample();
Two database table:
BookExample
- BokExampleID (primary key)
- BookID (Foreign key)
- OrderDetailID (Foreign key)
Book
- BookID (primary key)
- KategoryID (Foreign key)
- LanguageID (Foreign key)
- Title
BookID is a foreign key in table BookExample from table Book
If orderdetailID is NULL it means that this specfik bookexample is available in the store
Goal:
Display two column that is “Title” and “stock availiable”. “stock availiable” is a customized column that don’t exist in the database. “stock available” should contain numbers for instance 2 books of title …. is available.
Problem:
Having problem to find right source code in Linq in order to display these two column.
// Fullmetalboy
If I understand your question right, this should be what you’re looking for.