Exemplo n.º 1
0
        public bool UpdateEngineStatus(String ShipperDuns, bool EngineStatus)
        {
            string conString = GetConStringByShipperDuns(ShipperDuns);

            try
            {
                using (UPRDEntities db = new UPRDEntities(conString))
                {
                    var settingResult = db.Setting.Where(s => s.Name.ToLower() == "iiteston").FirstOrDefault();
                    settingResult.Value           = EngineStatus.ToString();
                    db.Entry(settingResult).State = EntityState.Modified;
                    db.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            { }
            return(false);
        }
Exemplo n.º 2
0
 public virtual void Update(T entity)
 {
     dbSet.Attach(entity);
     dataContext.Entry(entity).State = EntityState.Modified;
 }