Пример #1
0
        public bool Themthongtin(string id, Thongtinnguoidung entity)
        {
            entity.Tentaikhoan = id;
            entity.Flag        = true;
            var res = db.Thongtinnguoidungs.Add(entity);

            db.SaveChanges();
            return(true);
        }
Пример #2
0
        public bool suathongtin(string id, Thongtinnguoidung entity)
        {
            var res = db.Thongtinnguoidungs.Where(model => model.Tentaikhoan == id).SingleOrDefault();

            res.Hoten       = entity.Hoten;
            res.Namsinh     = entity.Namsinh;
            res.Sodienthoai = entity.Sodienthoai;
            res.Quequan     = entity.Quequan;
            db.SaveChanges();
            return(true);
        }