public AnketSoruAratablo FillAnketSoruAratablo(IDataReader reader)
 {
     nesne = new AnketSoruAratablo();
     nesne.AnketId=(Int32)reader["ANKET_ID"];
     nesne.SoruId=(Int32)reader["SORU_ID"];
     return nesne;
 }
 public int Delete(int anketId,DbTransaction dbTransaction,Database db)
 {
     sqlText="DELETE ANKET_SORU_ARATABLO where ANKET_ID=@anketId ";
      			dbComm = db.GetSqlStringCommand(sqlText);
     db.AddInParameter(dbComm, "@anketId", DbType.Int32, anketId);
     AnketSoruAratablo nesne = new AnketSoruAratablo();
     nesne.AnketId = anketId;
     return base.Delete(nesne, dbComm, dbTransaction, db);
 }
 public int Insert(AnketSoruAratablo nesne,DbTransaction dbTransaction,Database db)
 {
     sqlText="INSERT INTO ANKET_SORU_ARATABLO (ANKET_ID,SORU_ID)VALUES(@anketId,@soruId)SELECT @@IDENTITY";
      			dbComm = db.GetSqlStringCommand(sqlText);
     db.AddInParameter(dbComm, "@anketId", DbType.Int32, nesne.AnketId==null?(object)DBNull.Value:nesne.AnketId);
     db.AddInParameter(dbComm, "@soruId", DbType.Int32, nesne.SoruId==null?(object)DBNull.Value:nesne.SoruId);
     return base.Insert(nesne, dbComm, dbTransaction, db);
 }
 public int Update(AnketSoruAratablo nesne,DbTransaction dbTransaction,Database db)
 {
     sqlText=" UPDATE ANKET_SORU_ARATABLO set SORU_ID = @soruId WHERE ANKET_ID = @anketId ";
      			dbComm = db.GetSqlStringCommand(sqlText);
     db.AddInParameter(dbComm, "@anketId", DbType.Int32, nesne.AnketId==null?(object)DBNull.Value:nesne.AnketId);
     db.AddInParameter(dbComm, "@soruId", DbType.Int32, nesne.SoruId==null?(object)DBNull.Value:nesne.SoruId);
     return base.Update(nesne, dbComm, dbTransaction, db);
 }
 public AnketSoruAratablo GetById(int anketId,Database db)
 {
     nesne = new AnketSoruAratablo();
     sqlText="Select ANKET_ID,SORU_ID from ANKET_SORU_ARATABLO where ANKET_ID=@anketId ";
      			dbComm = db.GetSqlStringCommand(sqlText);
     db.AddInParameter(dbComm, "@anketId", DbType.Int32, anketId);
     using (IDataReader reader = db.ExecuteReader(dbComm)){
         if(reader.Read()){
             nesne = FillAnketSoruAratablo(reader);
         }else nesne=null;
     }
     return nesne;
 }