示例#1
0
 public static bool Delete(District dist)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             db.Entry(dist).State = System.Data.Entity.EntityState.Deleted;
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }
示例#2
0
 public static bool Insert(District district)
 {
     using (FotografPaketiEntities db = new FotografPaketiEntities())
     {
         try
         {
             district.DeleteStatus = false;
             db.District.Add(district);
             db.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
             throw;
         }
     }
 }