public void Update(PublisherStaroseletsEV book) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "UPDATE Author SET PublisherName = @PublisherName, Adress = @adress, Phone = @phone, Mail = @mail WHERE idPublisher = @idPublishr"; db.Execute(sqlQuery, book); } }
public void Create(PublisherStaroseletsEV book) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "INSERT INTO Publishers (PublisherName, Adress, Phone, Mail) VALUES(@publisherName, @adress, @phone, @mail)"; db.Execute(sqlQuery, book); } }