Instantly share code, notes, and snippets.

@bpatra /gist:9517801
Last active Aug 29, 2015

Embed
What would you like to do?
ChampionshipBetViewModel overview
public class ChampionshipBetViewModel : IChampionshipBetViewModel, IDropTarget
{
private readonly IChampionship _championship;
public ChampionshipBetViewModel(IChampionship championship)
{
_championship = championship;
FootballClubs = new ObservableCollection<IFootballClub>(championship.UserBet);
}
public ObservableCollection<IFootballClub> FootballClubs { get; private set; }
public ICommand ClickSave
{
//MyRelayCommand is an implementation of ICommand that executes the lambda passed as parameter
get { return new MyRelayCommand(() => { _championship.UserBet = new List<IFootballClub>(FootballClubs); }); }
}
public void DragOver(IDropInfo dropInfo)
{
throw new NotImplementedException();
}
public void Drop(IDropInfo dropInfo)
{
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment