private void SyncWebChatData(object obj) { List <Friend> fs = (List <Friend>)obj; FriendDataDA da = new FriendDataDA(); Friend fri = fs.Where(f => f.IsOwner > 0).FirstOrDefault(); da.Init(); List <FriendDataDA> fas = fs.Select <Friend, FriendDataDA>(s => s.ConvertMapModel <Friend, FriendDataDA>()) .Where(d => { if (fri != null) { d.DataBelongUserNick = fri.NickName; d.DataBelongUserName = fri.UserName; } d.Init(); d.CreateTime = da.CreateTime; return(true); }).ToList(); IWebFriendService web = new WebFriendService("TencentWebChatDAConnString"); web.InsertList(fas); }
public bool Add(FriendDataDA entity) { throw new NotImplementedException(); }