Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
     }
 }