We have a database with some fields that are varchar(max) which could contain lots of text however I have a situation where I only want to select the first for example 300 c
return from locationPart in db.locations
select new LocationPart
{
Description = locationPart.description,
Text = locationPart.text.Substring(0,300)
};
Not ideal because I have to use "select new" to return a a different object, but it seems to work.