linq查询结果datetime类型转string类型

var list = new SupplierLogic().GetSupplier(pageSize, pageIndex).Select(q => new
                {
                    SupplierID = q.SupplierID,
                    SupplierAccount = q.SupplierAccount,
                    SupplierName = q.SupplierName,
                    SupplierType = q.SupplierType,
                    AddTime = ((DateTime)q.AddTime).ToString(),
                    AppKey = q.AppKey,
                    IsLocked = q.IsLocked
                }).ToList();

对datetime类型结果进行二次查询.

原文地址:https://www.cnblogs.com/fumj/p/3497681.html