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

  • SEARCH
  • Home
  • 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 8037607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:58:40+00:00 2026-06-05T02:58:40+00:00

I have the following model: A workflowconfiguration has a Brand and also has a

  • 0

I have the following model:

A workflowconfiguration has a Brand and also has a type.
A Workflowconfiguration has a collection of Approvers.
The Approvers entity has property Status and username.

In another part of the application, we have an entity called RequestBase
This entity has a string property called CurrentStatus.

I need to make a query with linq or EF Lambda expressions that returns me ALL requests which status matches the username on the approvers entity.
I know its a little bit complicated, or really much complicated, lol.

These are my entities(simplified)

public class RequestBase
    {
        public int RequestBaseId { get; set; }
        public string CurrentStatus { get; set; }
      }


 public class WorkflowConfiguration
    {
        public int WorkflowConfigurationId { get; set; }
        public WorkflowType WorkflowType { get; set; }
        public Brand Brand { get; set; }
        public virtual ICollection<Approver> Approvers { get; set; }

    }


public class Approver
    {
        public Approver()
        {

        }

        public Approver(string approverUserName)
        {
            Name = approverUserName;
        }

        public int Id { get; set; }
        public string Name { get; set; }
        public string StepName { get; set; }  -----||||>>>>>> Must match status?
        public int Order { get; set; }
    }

and my query?
obviously it does not even compile

return _context.RequestBases.
                        .Where(a => a.CurrentStatus.Any(workflowconfiguration.Select(b=>b.Approvers.Select(c => c.StepName))));
  • 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-06-05T02:58:41+00:00Added an answer on June 5, 2026 at 2:58 am
    _context.RequestBases
    .Where(rb => _context.Workflowconfiguration
        .Any(wc => wc.Approvers
            .Any(a => a.StepName == rb.CurrentStatus)));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following model classes: @Entity @Table(name = title) public final class Title
I have the following model entity: public class ScheduledTask { public virtual int ScheduledTaskId
I have following model. class Comment(models.Model): type = models.CharField(max_length=21, choices=OBJECT_TYPE_CHOICES) program = models.ForeignKey(Program, db_column='object_id',
I have a entity that has a scalar string property Clarified. Clarified can have
I have the following model property: [DataType(DataType.EmailAddress)] public string EmailAddress { get; set; }
I have the following model in datamapper: class Student include DataMapper::Resource property :id, Serial
I have the following model: WebPromocion: connection: doctrine tableName: WebPromocion columns: id: type: integer(4)
I have the following model: model rank(Models.model): username = models.CharField(max_length=200, default=0) points = models.IntegerField(default=0)
I have the following model defined in .NET: Public Class Request <Key()> Public Property
I have the following model: class Entry include Mongoid::Document field :title, type: String field

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.