I looked online and this was the best solution I could find but it's doesn't compile correctly.
Code:
var myFight = from r in myEntity.FIGHTs
let WvsL = string.Format("{0} vs {1}", r.Winner, r.Loser)
select new {
Match = WvsL,
r.Result,
r.RoundEnd,
r.TimeEnd,
r.FOTN,
r.KOTN,
r.SOTN,
r.TitleFight
};
I want to concatenate the 2 fighters names into one column called Match. My compiler error is as follows:
Code:
LINQ to Entities does not recognize the method 'System.String Format(System.String, System.Object, System.Object)' method, and this method cannot be translated into a store expression.
What would be the best to go about this?
And I really appreciate the quick resonses so far. I have spent all of my schooling doing mostly C++ programming and this web stuff has so much syntax to learn it makes my head explode. lol