Posted By

housecor on 01/29/11


Tagged

to entities Linq


Versions (?)

Convert int to string in LINQ to Entities Query


 / Published in: C#
 

URL: http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.aspx

For some reason, methods in this class can actually be called to manipulate data in EF queries.

  1. ddEnrollmentMethod.DataSource = from t in context.EnrollmentMethods
  2. orderby t.Name
  3. select new
  4. {
  5. Name = SqlFunctions.StringConvert((double)t.EnrollmentMethodID) + ". " + t.Name,
  6. t.EnrollmentMethodID
  7. };

Report this snippet  

You need to login to post a comment.