//private IQueryable<Person> person;

        public void DoAddData(DateTime date, string name)
        {
            using (PersonDb db = new PersonDb())
            {
                Person person = new Person {
                    Id = 1, Date = date, Name = name
                };
                db.Persons.Add(person);
                db.SaveChanges();
            }
        }
        public List <Person> DoShowData()
        {
            List <Person> temp = new List <Person>();

            using (PersonDb db = new PersonDb())
            {
                //var person = from t in db.Persons where t.Name.Length > 0 select t;
                temp = db.Persons.Where(x => x.Name.Length > 0).ToList();
                //foreach(Person t in person)
                //{
                //    temp.Add(t);
                //}
            }
            return(temp);
        }
 public void DoRemoveData(string name)
 {
     using (PersonDb db = new PersonDb())
     {
         foreach (Person man in db.Persons)
         {
             //if(man.Name == name || man.Id == int.Parse(name) || man.Date == name)
             if (man.Name == name || man.Id == int.Parse(name))
             {
                 db.Persons.Remove(man);
             }
         }
         db.SaveChanges();
     }
 }