ASP.NET MVC 3 Linq uppercase or lowercase database search
Posted
by
user1495557
on Stack Overflow
See other posts from Stack Overflow
or by user1495557
Published on 2012-07-02T09:07:52Z
Indexed on
2012/07/02
9:15 UTC
Read the original article
Hit count: 342
I need immediate help. ): and i know little english.
ASP.NET MVC 3 Linq uppercase or lowercase contains search
Example:
string metin="baris";
var IcerikAra = (from icerik in Context.dbDokumanEditor
join kategori in Context.dbDokumanKategori on
icerik.KategoriID equals kategori.KategoriID
where icerik.Icerik.toLower().Contains(metin)
select new {
KategoriID=kategori.
KategoriAd=kategori.KategoriAd
}).ToList();
Exception: StackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommandentityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Plus.Areas.DokumanEditor.Controllers.DokumanController.DokumanIcerikAramaBaslat(String metin)
Error Message: An error occurred while executing the command definition. See the inner exception for details.
thanks..
© Stack Overflow or respective owner