ElmcityUtils.TableStorage.ExistsEntity C# (CSharp) Method

ExistsEntity() public method

public ExistsEntity ( string tablename, string query ) : bool
tablename string
query string
return bool
        public bool ExistsEntity(string tablename, string query)
        {
            var ts_response = QueryEntities(tablename, query);
            var dicts = ts_response.list_dict_obj;
            return dicts.Count == 1;
        }

Same methods

TableStorage::ExistsEntity ( string tablename, string partition_key, string row_key ) : bool

Usage Example

Beispiel #1
0
        public void ExistsEntitySucceedsForExistingEntity()
        {
            CreateEntityIsSuccessful();
            var q = string.Format(TableStorage.query_template_pk_rk,
                                  test_partition, test_row);

            Assert.AreEqual(true, ts.ExistsEntity(test_table, q));
        }