I want to get data from related entity based on multiple conditions in a single query
I have two tables Employee(EmpId,EmpName) and Attendance(AttId,ScanType,ScanTime,EmpId), I want to display data for each month for all Employees. In Attendance table Scan type have multiple values for in-time and out-time. I want to select smallest value as in-time and largest value as out-time for each employee and store for each employee in view model. ViewModel(EmpId,In-time,Outtime).
What will be the query for this?
I think you need to create attendance system in asp.net, as explained here
https://qawithexperts.com/questions/230/how-to-create-monthly-attendance-sheet-with-mvc
You can refer all comments/answer from this question to get the desired output.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly