sdk/dotnet/test/Microsoft.Datasync.Client.Test/Table/Operations.OfflineTableOfT/GetAsyncItems.Test.cs
/// <summary>
/// Injects a set of items into the store.
/// </summary>
/// <param name="nItems"></param>
/// <returns></returns>
Injects a set of items into the store.
Injects a set of items into the store .
private List<ClientMovie> InjectRandomItems(int nItems = 5)
        {
            List<ClientMovie> items = new();
            for (int i = 0; i < nItems; i++)
            {
                var item = new ClientMovie { Id = $"id-{i}", Title = "true" };
                var instance = (JObject)table.ServiceClient.Serializer.Serialize(item);
                items.Add(item);
                store.Upsert("movies", new[] { instance });
            }
            return items;
        }
private List < ClientMovie > InjectRandomItems ( int nItems = 5 ) { List < ClientMovie > items = new ( ) ; for ( int i = 0 ; i < nItems ; i ++ ) { var item = new ClientMovie { Id = $" id- { i } " , Title = " " } ; var instance = ( JObject ) table . ServiceClient . Serializer . Serialize ( item ) ; items . Add ( item ) ; store . Upsert ( " " , new [ ] { instance } ) ; } return items ; }
Injects a set of items into the store.
Injects a set of items into the store .
None
nItems
int
None