how to filter in DBcontext where value in list

ahmed omar 181 Reputation points
2023-05-13T21:43:57.4166667+00:00

Hello,

please I need to make dbcontect where value in list

the current code is

[HttpGet("FindOwnersDocotr")]
        public async Task<IActionResult> GetWonerDotor(string wonerId)
        {
            List<FellowDoctors> dr = await dbContext.FollowDoctors.Where(a => a.ownerId == wonerId).ToListAsync();
         

            if (dr.Count == 0)
            {
                return NotFound("not found");
            }
            return Ok(dr);
        }

and the result is



and I need to get from the Doctor table where DoctorId is in the above json

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
695 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,203 questions
{count} votes