public async Task <IActionResult> PutThongTinDatCho([FromRoute] long id, [FromBody] ThongTinDatCho thongTinDatCho)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != thongTinDatCho.MaDatCho)
            {
                return(BadRequest());
            }

            _context.Entry(thongTinDatCho).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ThongTinDatChoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> Create([Bind("UserID,SDT,MatKhau,Email,HoTen,GioiTinh,DiaChi,NgaySinh,Avatar,CreatedTime,UpdateTime")] NguoiDung nguoiDung)
        {
            if (ModelState.IsValid)
            {
                nguoiDung.MatKhau     = nguoiDungLogic.GetMD5(nguoiDung.MatKhau);
                nguoiDung.CreatedTime = DateTime.Now;
                _context.Add(nguoiDung);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(nguoiDung));
        }