public ReservationsViewModel(Dispatcher dispatcher, NorthwindContext northwindContext) { this.dispatcher = dispatcher; this.Context = northwindContext; this.rItems = new DataServiceCollection<Reservation>(northwindContext); this.tItems = new DataServiceCollection<Table>(northwindContext); this.rItems.LoadCompleted += this.OnrItemsLoadCompleted; this.tItems.LoadCompleted += this.OntItemsLoadCompleted; }
public NorthwindContext ResolveNorthwindContext() { var serviceUri = new Uri(this.appResources["NorthwindOdataEndpoint"].ToString()); var context = new NorthwindContext(serviceUri); context.SendingRequest += (s, e) => { var credentials = this.ResolveStorageCredentials(); credentials.AddAuthenticationHeadersLite(null, e.RequestHeaders); }; return context; }
public RestaurantDetailsPageViewModel(Dispatcher dispatcher, NorthwindContext northwindContext) { this.dispatcher = dispatcher; this.Context = northwindContext; }
public CustomerDetailsPageViewModel(Dispatcher dispatcher, NorthwindContext northwindContext) { this.dispatcher = dispatcher; this.Context = northwindContext; }