15,999,861 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge Â
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by chinnuTest (Top 8 by date)
chinnuTest
9-Jul-20 12:11pm
View
var fulltimeemployees= db.Table<fulltimeemp>().Where(fl => siteId == null || fl.SiteId == siteId).ToList();
employees = db.Table<employee>()
.Where(e => fulltimeemployees.Any(fe=> fe.EmployeeId ==e.Id) || e.IsDefault)
.ToList();
Sorry, but posting one last time if you can see any mistake please let me know. These are two queries I am using but code is breaking at second one when it is executing. Is there anything wrong here ?
Thank you so much..
chinnuTest
8-Jul-20 17:02pm
View
I know with out knowing DB structure it's tough , Thank you for your help so far. but the above query I tried but It's not working when I debug query breaking at run time..
employees = db.Table<employee>()
.Where(e => fulltimeemployees.Any(fe=> fe.EmployeeId ==e.Id) || e.IsDefault)
.ToList();
chinnuTest
8-Jul-20 12:51pm
View
Sorry I did update the question completely. I am having issue at fte.id I did modified it to fte.EmployeeId but still it is not taking it.
'Guid' does not contain a definition for 'EmployeeId' and no accessible extension method 'EmployeeId' accepting a first argument of type 'Guid' could be found (are you missing a using directive or an assembly reference?)
chinnuTest
8-Jul-20 10:21am
View
Can you please any one help me on this ?
chinnuTest
7-Jul-20 14:21pm
View
Hi,
Thank you for helping me on this, but I am having issue at fte.id even I tried fte.EmployeeId -- It saying Guid doesn't have a definition for EmployeeId…. Sorry I didn't provide full information earlier updated query in my post. can you please help me ?
var employees = new List<employee>();
var fulltimeemployees= db.Table<fulltimeemp>().Where(fl => siteId == null || fl.SiteId == siteId).Select(e => e.EmployeeId);
employees = db.Table<employee>().Where(e => fulltimeemployees.Contains(e.Id) || e.IsDefault).ToList();
return employees ;
chinnuTest
5-Mar-20 15:30pm
View
Thank you so much MadMyche It worked. Appreciated for your help..
chinnuTest
26-Feb-20 17:41pm
View
Thank you so much.. Appreciated for your help...
chinnuTest
26-Feb-20 14:06pm
View
Thank you so much for detailed query,i really appreciated. you made my day... the query you have given works perfect. But you didn't join Device table to it if possible can you please join that Device table and condition to below linq query ?
int[] vid2get = new int[]{4,7,2,8,9};
DateTime finaldate = DateTime.Now.AddDays(-10);
var qry1 = PatVisit_context
.Where(x=> vid2get.Any(y=>y==x.VisitId) && x.VisitDate >= finaldate)
.GroupBy(x=> x.PatId)
.Select(grp=> grp.OrderByDescending(y=>y.VisitDate).First())
.ToList();
Show More