so che LINQ to entità non supporta costruttori parametrizzati, ma come fare questo Pls:?LINQ to entità parametrizzata costruttore Datetime
date = new DateTime(int.Parse(SqlFunctions.StringConvert(l.rok).Trim()), int.Parse(SqlFunctions.StringConvert(l.mesic).Trim()), 1)
intero esempio:
var objects = from object in GetObjects()
select new MyObject{
name = object.name;
date = new DateTime(object.rok,object.month,object.day)
}
Come fare questo ?
Questo è ora sostituito da System.Data.Entity.DbFunctions.CreateDateTime – youen
Un mini esempio con "CreateDateTime" sarebbe bello. Grazie –