我有以下包含评论的课程:
public class Review
{
public string PartitionKey { get; set; }
public string RowKey { get; set; }
}
IEnumerable<Review> review = // Filled with about 1000 reviews
我还有一个包含主题的课程:
public class Topics
{
public string PartitionKey { get; set; }
public string RowKey { get; set; }
public string Topic { get; set; }
}
IEnumerable<Topic> topic = // Filled with about 300 topics
Review RowKey的前六个字符与 Topics 中的 RowKey 相同。在这两种情况下,分区键都是空字符串且未使用。
我在评论类中有大约 1000 条记录,在主题类中有 300 条记录。
有没有一种好方法可以使用 LINQ 结合 Review 和 Topics 来填充下面的新类:
public class ReviewGrid
{
public string PartitionKey { get; set; } // PartitionKey from Review
public string RowKey { get; set; } // RowKey from Review
public string Topic { get; set; } // This would be the Topic from Topics
}
如果我使用 LINQ 执行此操作,是否需要很长时间才能创建?有没有办法让它更快地创建?