Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6882301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:14:10+00:00 2026-05-27T05:14:10+00:00

I have the following domain model setup using EF code first: public class User

  • 0

I have the following domain model setup using EF code first:

public class User
{
    public virtual int Id { get; set; }
    public virtual string Email { get; set; }
    public virtual ICollection<UserProcessed> UsersProcessed { get; set; }
}

public class UserProcessed
{
    public virtual int Id { get; set; }
    public virtual DateTime CreatedAt { get; set; }
    public virtual User user { get; set; }
}

I am trying to translate the following T-SQL query into LINQ and I am having some difficulties:

SELECT u.Email
FROM Users u LEFT JOIN UsersProcessed up ON u.Id = up.UserId
WHERE up.UserId IS NULL
AND u.CreatedAt BETWEEN '2011-12-01' AND '2011-12-01'

This will return all users that have not been processed (UserId does not exist in UsersProcessed table).

IEnumerable<User> users = Database.Set<User>().Where(....).ToList();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:14:11+00:00Added an answer on May 27, 2026 at 5:14 am

    This may not translate to exactly the same query when SQL is produced, but it should do the trick:

    IEnumerable<User> users = Database.Set<User>().Where(u => !u.UserProcessed.Any()).ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following domain model: public class Campaign { public virtual long Id
Given domain model... public class Entity { public int Id { get; set; }
If I have the following domain object: public class Customer { public virtual Guid
I have the following domain model: public class Name { private readonly string fullName;
I have the following domain: public class FileInformation { public String FileName; public String
I have the following project structure using a Domain Model, StructureMap and Fluent NHibernate:
I have the following model class DNS(models.Model): domain = models.ForeignKey(Domain) host_start = models.CharField(max_length=150, blank=True,
I have a domain data model which returns a class such as the following:
In my domain model I have following Classes.A 'UserProfile' has one 'SecurityPrincipal' class SecurityPrincipal{
My domain model uses EntityFramework 4.1 (and I'm using code-first) to update my DB

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.