This is a migrated thread and some comments may be shown as answers.

Is there any query in Entity Framework so i can convert first letter of each record in uppercase

0 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Swapnil
Top achievements
Rank 1
Swapnil asked on 24 Sep 2012, 07:37 AM
I am trying like
using system.globalization
TextInfo ti = CultureInfo.GetCultureInfo("en-Us").TextInfo;

 var query1 = from bookinformation in ent.BOOKINFORMATIONs select                                                                                          ti.ToTitleCase(bookinformation.AUTHORNAME.ToLower());
                  query1 = query1.Distinct();
                  cmb1.DataSource = query1;
                  cmb1.DataBind();


but getting exception
LINQ to Entities does not recognize the method 'System.String ToTitleCase(System.String)' method, and this method cannot be translated into a store expression.

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Swapnil
Top achievements
Rank 1
Share this question
or