public void DeleteSet(FlashCardSet flashCardSet)
 {
     _connection.Delete<FlashCardSet>(flashCardSet.ID);
     string query = "Delete from CardInSet where SetID == ?"; //todo:create query that adds //and make these tables cascade foreign keys
     _connection.Execute(query, flashCardSet.ID);
     _messenger.Publish(new FlashCardSetListChangedMessage(this));
     //todo:add messaging to alert that a set no longer exists
 }
 public void CreateSet(FlashCardSet set)
 {
     _connection.Insert(set);
     _messenger.Publish(new FlashCardSetListChangedMessage(this));
 }
 public void RenameSet(FlashCardSet flashCardSet)
 {
     _connection.Update(flashCardSet);
 }
 private void AddToSet(FlashCard card, FlashCardSet flashCardSet)
 {
     var id = _flashCardManager.CreateCard(Card);
        _flashCardManager.AddCardtoSet(id,flashCardSet.ID);
     Close(this);
 }
 private void NavigateToSetDetailsView(FlashCardSet theSet)
 {
     ShowViewModel<FlashCardSetDetailsViewModel> (new Nav(){
             Id = theSet.ID
         });
 }
 private void DoAddCommand()
 {
     if
     (!string.IsNullOrEmpty(NewSetName))
         {
         FlashCardSet set = new FlashCardSet {SetName = NewSetName};
             _flashCardManager.CreateSet(set);
         }
 }