score:3
Accepted answer
return (from a in ObjectContext.tblaptmts
join ch in ObjectContext.tblConsultationHours
on a.consultationID equals ch.consultationID
where a.studentID == StuId
select new StudentViewAppointment()
{
AppointmentId = a.aptmtID,
Apremark = a.apremark,
-----
-----
});
Source: stackoverflow.com
Related Articles
- Return joined table
- EF Code First- Return Records from Many to Many Table
- This code returns distinct values. However, what I want is to return a strongly typed collection as opposed to an anonymous type
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- LINQ Source Code Available
- .NET 4 Code Contracts: "requires unproven: source != null"
- How do i exlude two columns from db table in the return LINQ?
- How to return both parent and child using LINQ against 1 table
- How can I return data from my table grouped but still in order of title?
- How do I return data from joined tables through subsonic's objects?
- creating Linq to sqlite dbml from DbLinq source code
- SQL RANDOM ORDER BY ON JOINED TABLE
- perfomance of single table vs. joined dual structure
- ef code first: get entity table name without dataannotations
- How do I add multiple joins (Fetches) to a joined table using nhibernate and LINQ?
- linq-to-sql group by list of strings from a joined table
- How can i copy data table records of different field name based on mapping list evaluating condition on source data table?
- how to return false if no records exist in table
- Linq code doesn't return correct record
- Linq except return whole table
- Return Dictionary<int,List<Int>> from EntityFramework table
- LINQ query to return list where condition is based on another table
- LINQ query to return from one table based on matching another table
- LINQ does not recognize joined table in select clause
- Apply dynamic where clause to joined table
- Exclude null values while summation by specific column in a left joined table using LINQ
- Joint 3 tables in linq and return value of nested table with max id
- How to join table in LINQ and return list in MVC
- How do I return single data from primary table and multiple entries in second table nested after join
- Child Cobobox Return Null if DataValue Combobox NotExist in Child table ( LINQ )
- VB.NET sort IEnumerable class
- Outputting linq getting overflow exception
- Get by id from one model, items from another model using linq and relation one to many?
- use query linq in search with empty field
- How and where to use AddRange() method
- How to cast linq query to an object IEnumerable module class type?
- Linq Query, looping thru datatable, joining and get the index
- C# Nested Lists: Getting an error "Object reference not set to an instance of an object."
- construct expression tree in run time
- Linq Query with Contains and Nullable Value
- How to combine two columns from a database with LINQ?
- How can I use Aggregate Operators in Linq queries with multiple tables?
- Linq where condition not working
- LINQ - Calling Filter with a Predicate<T>
- c# linq join on a sublist in a list
- Rewrite sql query to LINQ. Can't find an error
- Dynamic LINQ Select method "selector" argument
- What are the benefits of the bindable Linq?
- LINQ to SQL Query Across Entity Sets Optimization
- ORA-00923 dot net core devart provider FirstOrDefault() query error