0

I have a Logs table created in Windows Azure (WADLogsTable). I need to get a specific column of a given time period. Below is the Linq query I used. Here "Logs" means my own created DTO class. There is no error when building. But when running it gives an error (doesn't show much details).

List<Logs> promotionInfo =null;

promotionInfo = (from e in serviceContext.CreateQuery<Logs>("WADLogsTable")
                         where e.Timestamp > startDate && e.Timestamp < endDate
                         select new Logs { Pid= e.Pid }).ToList();

Please show me where is my fault.

4

1 に答える 1

3

参考になる情報があまりないので... google-fuを引き付ける...

where-byには既知の機能CreateQuery<T>があり、結果がなく (特にテーブルが空の場合)、複数の "where" 条件 (異なるタイプの操作を介して入る) がある場合にエラーになる可能性があります。リンクされたページは、これに対する回避策を示しています。これには、基本的IgnoreResourceNotFoundExceptionに true に設定することが含まれます。

于 2012-10-12T07:10:00.997 に答える