differentiate between upper and lower case letters

Asked

Viewed 74 times

0

I’m performing database query, but I would like to differentiate the uppercase letters from lowercase, because the way it is if I type test and value that is in the bank for Testing I get nothing in my query, some way to do this with Linq?

Man controler

public ActionResult Index(int? pagina, string consulta)
{
    int paginaTamanho = 10;
    int paginaNumero = (pagina ?? 1);
    var dados = db.Ramais.ToList();
    return View(dados.ToPagedList(paginaNumero, paginaTamanho));
}
  • What is your database and which version of the Entity framework is your project?

1 answer

1

you’ve tried it here ?

suaString.ToUpper());

Or if you prefer to ignore lower case

ex: var texto.Equals("Minha string", StringComparison.InvariantCultureIgnoreCase)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.