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))); } }