예제 #1
0
        public avoter delete(int id)
        {
            avoter a = context.avoter.Find(id);

            if (a != null)
            {
                context.avoter.Remove(a);
                context.SaveChanges();
            }
            return(a);
        }
예제 #2
0
        public avoter Getv(String name, String password)
        {
            avoter a = context.avoter.Where(i => i.Name == name && i.password == password).FirstOrDefault();

            return(a);
        }
예제 #3
0
        public avoter Getvote(String name)
        {
            avoter a = context.avoter.Where(i => i.Name == name).FirstOrDefault();

            return(a);
        }
예제 #4
0
 public avoter Add(avoter v)
 {
     context.avoter.Add(v);
     context.SaveChanges();
     return(v);
 }