.Select(z => new Tranlit.DAL.TablesMapping.V_SX_CYInformationInfo
{
AutoId = z.b.AutoId,
Original = z.b.Original,
Publisher = z.b.Publisher,
Title = z.b.Title,
Contents = z.b.Contents,
MainPrompt = z.b.MainPrompt,
Created = z.b.Created,
Hit = z.b.Hit,
ShareCount = z.b.ShareCount,
Review = z.b.Review,
Relay = z.b.Relay,
IsSecret = z.b.IsSecret,
IsDraft = z.b.IsDraft,
CategoryId = z.b.CategoryId,
ChannelId = z.b.ChannelId,
ColumnId = z.b.ColumnId,
IsSynchroUnion = z.b.IsSynchroUnion,
IsSynchroView = z.b.IsSynchroView,
IsConfirm = z.b.IsConfirm,
Source = z.b.Source
}).ToList();
如上面这段代码 ,每个字段都要赋值,有没有简单点的写法(解决匿名对象问题)
------最佳解决方案--------------------------------------------------------
想简单 ,那你用代码生成器吧
------其他解决方案--------------------------------------------------------
想简单 ,那你用代码生成器吧
------其他解决方案--------------------------------------------------------