public static List<PostContent> GetNewContents(IEnumerable<PostContent> dbContents, IEnumerable<PostContent> clientContents, int userId)
{
var newContents = (from c in clientContents
where dbContents.All(a => a.MediaId != c.MediaId)
select c).ToList();
foreach (var pc in newContents)
{
pc.CreatedDate = DateTime.Now;
pc.CreatedBy = userId;
pc.ModifiedDate = DateTime.Now;
pc.ModifiedBy = userId;
}
return newContents;
}
}