public void Update(TravelCard.DomainModel.Entities.TCBarCode TCBarCode_)
        {
            var tcbarcodetoupdate = _qualityEntities.TCBarCodes
                                    .FirstOrDefault(x => x.TCBarCodeID == TCBarCode_.TCBarCodeID);

            tcbarcodetoupdate.PartSetUpID = TCBarCode_.PartSetUpID;
            tcbarcodetoupdate.BarCodeText = TCBarCode_.BarCodeText;
            tcbarcodetoupdate.BarCodeFile = TCBarCode_.BarCodeFile;

            _qualityEntities.SaveChanges(SaveOptions.None);
        }
 public int Insert(TravelCard.DomainModel.Entities.TCBarCode tcbarcode_)
 {
     try
     {
         var tcbarcodetoinsert = new TravelCard.DomainModel.Entities.TCBarCode
         {
             PartSetUpID = tcbarcode_.PartSetUpID,
             BarCodeText = tcbarcode_.BarCodeText,
             BarCodeFile = tcbarcode_.BarCodeFile
         };
         _qualityEntities.AddToTCBarCodes(tcbarcodetoinsert);
         _qualityEntities.SaveChanges(SaveOptions.None);
         return(tcbarcodetoinsert.TCBarCodeID);
     }
     catch (Exception ex)
     {
         string errormessage = ex.ToString();
         return(0);
     }
 }