public void Update(TEntity entity) { var entityDB = DbSet.Find(entity.Id); _context.Entry(entityDB).CurrentValues.SetValues(entity); entity.Usuario = string.IsNullOrEmpty(_variables.UserName) ? "STFCORP" : _variables.UserName; entity.DataAlteracao = DateTime.Now; DbSet.Update(entity); }
public ActionResult Edit([Bind(Include = "ID,Name,FtpBox,City,State,ZipCode,DaysBeforePSM")] HotelProperty hotelProperty) { if (ModelState.IsValid) { db.Entry(hotelProperty).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hotelProperty)); }
public void Update(ValorForecast valorForecast) { _context.Entry(valorForecast); DbSet.Update(valorForecast); AtualizarDataAlteracaoEUsuario(); }
public void Update(CityEntity item) { _context.Entry(item).State = EntityState.Modified; }
public void Update(ForecastET forecast) { _context.Entry(forecast); DbSet.Update(forecast); AtualizarDataAlteracaoEUsuario(); }