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

1 posts, 0 answers
  1. Swapnil
    Swapnil avatar
    30 posts
    Member since:
    Sep 2012

    Posted 24 Sep 2012 Link to this post

    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.
Back to Top