Exemplo n.º 1
0
 public MainWindow()
 {
     foodDao = new FoodDAOMSSQL();
     InitializeComponent();
     foods            = foodDao.GetAllFoods();
     grid.ItemsSource = foods;
 }
Exemplo n.º 2
0
        public HttpResponseMessage Get()
        {
            List <Food>  foods   = new List <Food>();
            FoodDAOMSSQL foodDao = new FoodDAOMSSQL();

            foods = foodDao.GetAllFoods();
            HttpResponseMessage msg = Request.CreateResponse(HttpStatusCode.OK, foods);

            return(msg);
        }
Exemplo n.º 3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     foods            = foodDao.GetAllFoods();
     grid.ItemsSource = foods;
 }