public void Update(Ogrenciler stu) { using (IDbConnection dbConnection = Connection) { string sQuery = @"UPDATE Students SET FirstName=@FirstName,LastName=@LastName,Number=@Number Where Id=@Id"; dbConnection.Open(); dbConnection.Execute(sQuery, stu); } }
public void Add(Ogrenciler stu) { using (IDbConnection dbConnection = Connection) { string sQuery = @"INSERT INTO Students (FirstName,LastName,Number) VALUES(@FirstName,@LastName,@Number)"; dbConnection.Open(); dbConnection.Execute(sQuery, stu); } }