I'm trying to grab out formatted values from a project.
I have a function declared:
public static string GetFormattedLink(string ExtTitleID)
{
return "Str_" + ExtTitleID;
}
How would I execute this statement from the Select Statement in Dynamic Linq I tried.
using (var Model = new MK3Entities())
{
var TOrigin = (Model.Titles.Where("ID > 19632")
.Select("new(ID, GetFormattedLink(ExtTitleID))")
as System.Collections.IEnumerable)
.Cast<dynamic>().Take(10).ToList();
}
However this returns the Exception: No applicable method 'GetFormattedLink' exists in type 'Title'.
How can I Formatted my results inside of the Select?