private void NaarDBButton_Click(object sender, RoutedEventArgs e) { this.Dispatcher.Invoke(() => { Bewerk(ConvertToBusinesslaag.convertToStrips(stripsFromDB)); //voer uit, schijf strips weg naar db }); }
public List <Auteur> GetStripAuteurs(int id) { var command = new SqlCommand("select * from Auteur join Strip_has_Auteur on auteur.id = Strip_has_Auteur.Auteur_id Where Strip_id = @id"); command.Parameters.Add(new SqlParameter("id", id)); return(ConvertToBusinesslaag.ConvertToAuteurs((List <AuteurDB>)GetRecords(command))); }
public IEnumerable <Reeks> GetAll() { // DBAs across the country are having strokes // over this next command! using var command = new SqlCommand("SELECT * FROM Reeks"); return(ConvertToBusinesslaag.ConvertToReeksen((List <ReeksDB>)GetRecords(command))); }
public Strip GetById(int id) { // PARAMETERIZED QUERIES! using (var command = new SqlCommand("SELECT * FROM Strip WHERE id = @id")) { command.Parameters.Add(new SqlParameter("id", id)); return(ConvertToBusinesslaag.convertToStrip(GetRecord(command))); } }
public Strip GetLastStrip() { // DBAs across the country are having strokes // over this next command! using (var command = new SqlCommand("SELECT TOP 1 * FROM Strip ORDER BY ID DESC")) { return(ConvertToBusinesslaag.convertToStrip(GetRecord(command))); } }
public IEnumerable <Strip> GetAll() { // DBAs across the country are having strokes // over this next command! using (var command = new SqlCommand("SELECT * FROM Strip")) { return(ConvertToBusinesslaag.convertToStrips((List <StripDB>)GetRecords(command))); } }
public IEnumerable <Uitgeverij> GetAll() { // DBAs across the country are having strokes // over this next command! using (var command = new SqlCommand("SELECT * FROM Uitgeverij")) { return(ConvertToBusinesslaag.ConvertToUitgevers((List <UitgeverijDB>)GetRecords(command))); } }