Skip to content

Filter one-to-many relationship #154

@flyspirit99

Description

@flyspirit99

Discussed in #153

Originally posted by flyspirit99 August 4, 2021
I started to use Sieve a couple of days ago and love it. Now I encounter a situation and don't know how to do it by Sieve

I have a one to many relationship like below

public class Company
{
  public ICollection<Certificate> Certificates {get; set;}
}

public class Certificate
{
    public string Name {get; set;}
    public int CompanyId { get; set;}
    public Company Company {get; set;}
}

In CompanyApiController.GetCompanies() action, I need to filter company by its certificate name. Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions