[Solved] using if statement under using case [closed]


You could try this one:

if (erisim == "A")
{
    return redisUser.GetAll();// .Where(c=>c.Sube=="Y");
}
else if (erisim == "P")
{
    return redisUser.GetAll().Where(c => c.Sube == sube);
}
else if (erisim == "C")
{
    return redisUser.GetAll().Where(c => c.CagriAcan == sicil);
}
else
{
    return Enumerable.Empty<RequestCall>();
}

solved using if statement under using case [closed]