I am trying to use Linq to Entites to convert a Guid in my database to a string. I have a CheckBoxListDTO. This DTO has 2 properties: Text and Value. They are both String data types. I have an error when I just try to do a .ToString() saying that Linq does
not allow ToString() for Entities. I then put .AsEnumerable() for my tables and it works. Will this way make it slower if I start having a lot of data in my database? Is there a better way around this?
My DTO:
public class CheckBoxListDTO
{
public string Text { get; set; }
public string Value { get; set;}
}
Linq Code that works:
result.businessIdList = (from ac in cd.tbl_AlertID.AsEnumerable()
from cdd in cd.tbl_Data.AsEnumerable()
where ac.mainId == cdd.mainId &&
ac.EmailI ...
Go to the complete details ...