Skip to content

custom data store not working #41

Description

@schnabs

I've created and registered a Table Data Store.

class ParticipantStore : BaseTableDataStore<Participant>
{
        
        public async Task<IEnumerable<Participant>> GetGameParticipantsAsync(Game game)
        {
            Initialize();
            await Sync();
            return await Table.Where(item => item.GameId == game.Id).ToEnumerableAsync();
        }

    }

public class ParticipantsViewModel : BaseAzureViewModel<Participant> {...}

and replaced

 //client.RegisterTable<Participant>();
 client.RegisterTable<Participant, ParticipantStore>();

Seems to fail when my view models vm.RefreshCommand.Execute(null) gets called

System.NullReferenceException: Object reference not set to an instance of an object.

Also,
Not sure how I can eventually call the GetGameParticipantsAsync(Game game) method I've created in the RefreshCommand because it looks like it only has a getter and no setter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions