public int AddMovie(Movie movie) { var Id = (int)DBX.ExecScalarQuery($"select max(Id) from Movie") + 1; string sqlAdd = $"insert into Movie values ({Id}, '{movie.title}', '{movie.genre}', '{movie.price}', '{movie.releaseDate}') "; DBX.ExecNonQuery(sqlAdd); return(Id); }
public void DeleteMovie(int id) { string sqlDelete = $"delete from Movie where Id = {id} "; DBX.ExecNonQuery(sqlDelete); }