public bool Update(NopCard NopCard)
        {
            try
            {
                var _NopCard = _dbContext.NopCards.FirstOrDefault(x => x.Id == NopCard.Id);
                _NopCard.UserId      = NopCard.UserId;
                _NopCard.NgayNopCard = NopCard.NgayNopCard;
                _NopCard.NoiDung     = NopCard.NoiDung;
                _NopCard.cardId      = NopCard.cardId;
                _NopCard.Phone       = NopCard.Phone;
                _NopCard.Email       = NopCard.Email;
                _NopCard.menhgiaId   = NopCard.menhgiaId;
                _NopCard.warenty     = NopCard.warenty;

                _NopCard.Status = NopCard.Status;
                return(true);
            }
            catch
            {
                return(false);
            }
        }
 public NopCard AddNopCard(NopCard NopCard)
 {
     NopCard.Id = Guid.NewGuid().ToString();
     return(_dbContext.NopCards.Add(NopCard).Entity);
 }