Example #1
0
        public bool Update(ThiSinh entity)
        {
            var ts = tn.ThiSinhs.Find(entity.MaThiSinh);

            ts.HoTen    = entity.HoTen;
            ts.GioiTinh = entity.GioiTinh;
            ts.NgaySinh = entity.NgaySinh;
            ts.DiaChi   = entity.DiaChi;
            ts.Image    = entity.Image;
            ts.Password = entity.Password;
            tn.SaveChanges();
            return(true);
        }
Example #2
0
 public int Insert(ThiSinh entity)
 {
     tn.ThiSinhs.Add(entity);
     tn.SaveChanges();
     return(entity.MaThiSinh);
 }
Example #3
0
 public DoashboardData()
 {
     tn = new TracNghiemEntities();
     ts = new ThiSinh();
 }