LINQ to Entities does not recognize the System.String ToString(System.String)
method, and this method cannot be translated into a store expression.
List<ModelName> List = await (
linq query write here
select new ModelName
{
Column Name,
chkIN = VD.CheckIN.ToString(),
}).ToListAsync();
CodePudding user response:
List<ModelName> List = await (
linq query write here
select new ModelName
{
Column Names,
checkin = VD.CheckIN.Value
}).ToListAsync();
List.ForEach(x => x.chkIN = x.checkin.HasValue ? DateTime.Today.Add(x.checkin.Value).ToString("hh:mm tt") : "");
return List;