c# - asp.net entity framework Contains Character problems -


asp.net entity framework contains character problem

table ciğer cikolata vs.vs.vs.

public ienumerable<kaloriler> kaloriara(string gelen) {     try     {         return dbkaloriler.getall().where(x => x.kaloridurumu == 1 && x.aktivite == 0 && x.kaloriadi.contains(gelen)).tolist();     }     catch (exception)     {         return null;     } } 

how find if incoming data "ciger"

data = ciger, cikolata, seker vs. contains : ciger = ciğer , cikolata = çikolata , şeker = seker

you should have strings english , turkish characters. can replace(it may two-sided replacement tr en or en tr) input string possible letters. block worked me after comment.

yourmodalname yourdbmodelinstance = new yourmodalname(); var result = yourdbmodelinstance.yourtable.where(x => x.yourcolumn.contains(englishcriteria) || x.yourcolumn.contains(turkishcriteria)); 

Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -