public bool Update(Film film) { try { Film filmToUpdate = _manager.Films.Find(film.Id); _manager.Entry(filmToUpdate).CurrentValues.SetValues(film); _manager.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool Update(User user) { try { User usertoupdate = _manager.Users.Find(user.Id); _manager.Entry(usertoupdate).CurrentValues.SetValues(user); _manager.SaveChanges(); return(true); } catch { return(false); } }
public bool Update(Theme theme) { try { Theme themeToUpdate = _manager.Themes.Find(theme.Id); _manager.Entry(themeToUpdate).CurrentValues.SetValues(theme); _manager.SaveChanges(); return(true); } catch (Exception) { return(false); } }