Exemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Training_19Sep18_PuneEntities tr = new Training_19Sep18_PuneEntities();

            Person_160918 p = new Person_160918();

            var VW = from v in tr.Person_160918 where v.FirstName.StartsWith(TXT.Text) select v;

            foreach (Person_160918 p1 in VW)
            {
                tr.Person_160918.Remove(p1);
            }
            tr.SaveChanges();
        }
Exemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Training_19Sep18_PuneEntities tr = new Training_19Sep18_PuneEntities();

            Person_160918 p = new Person_160918();

            var ve = from v in tr.Person_160918 where v.FirstName.StartsWith(TXT.Text) select v;

            //IEnumerable<Person_160918> person_160918s = ve;



            dataGrid.ItemsSource = ve.ToList();
        }