public MainPageViewModel() { this.guestbookService = new GuestbookService(); this.Messages = new AsyncPagedCollectionView <Message> { FetchData = this.FetchMessages }; this.PageCountVariants = new List <int> { 10, 15, 20, 25, 50, 100 }; this.OrderByVariants = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("UserName", "User Name"), new KeyValuePair <string, string>("Email", "E-mail Address"), new KeyValuePair <string, string>("CreatedAt", "Submit Date"), }; this.OrderBy = OrderByVariants[2].Key; this.AddCommentCommand = new RelayCommand(AddComment); this.CancelCommand = new RelayCommand(Cancel); this.PostCommand = new RelayCommand(Post); this.SetDefaultValues(); }
public GuestbookController(GuestbookService guestbookService) { _guestbookService = guestbookService; }
public IndexController(GuestbookService service) { this.Service = service; }