Possible to do Entity Transactions for "selects"?

Yanıt Possible to do Entity Transactions for "selects"?

  • 20 Eylül 2010 Pazartesi 00:54
     
     

    I have an array of PK RK pairs that I'd like to retrieve in a single operation.  I'm aware that I can't span Partitions within a query so I'm trying to determine if it's more efficient to select 100 records individually or a query like this:

    //Pretend there are 50 to 100 "rk"'s here

    var results = from c in _ServiceContext.ForumThreadCollectionTable
                              where (((c.RowKey == rk1) || (c.RowKey == rk2) || (c.RowKey == rk3) |(c.RowKey == rk4)) && c.PartitionKey == pk)
                              select c;

     

Tüm Yanıtlar

  • 20 Eylül 2010 Pazartesi 01:53
    Yanıtlayıcı
     
     Yanıt

    Regarding the ORs you might want to read Jai Haridas' post on this Azure Forum thread.