public async static Task<RestaurantContext> GetRestaurantContext() { if (_restaurantContext == null) { _restaurantContext = (new RestaurantContext()); await _restaurantContext.InitializeContextAsync(); } return _restaurantContext; }
private async void LoadData() { this.Repository = new RestaurantContext(); await this.Repository.InitializeContextAsync(); OnDataLoaded(); }