示例#1
0
 public void HavayoluSil(string Id_Havayolu)
 {
     try
     {
         using (DtbUcusEntities ctx = new DtbUcusEntities())
         {
             tblHavayollari hyl = ctx.tblHavayollaris.Find(Id_Havayolu);
             ctx.tblHavayollaris.Remove(hyl);
             ctx.SaveChanges();
         }
     }
     catch (SqlException ex)
     {
         throw ex;
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#2
0
 public void Guncelle(Havayolu ha)
 {
     try
     {
         using (DtbUcusEntities ctx = new DtbUcusEntities())
         {
             tblHavayollari hbl = ctx.tblHavayollaris.Find(ha.Id_Havayolu);
             hbl.Havayolu_Adi = ha.Havayolu_Adi;
             ctx.Entry <tblHavayollari>(hbl).State = EntityState.Modified;
             ctx.SaveChanges();
         }
     }
     catch (SqlException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }