Esempio n. 1
0
 public static void RemoveTenant(tenant_tbl tenant)
 {
     using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities())
     {
         db.Entry(tenant).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public static void Add(tenant_tbl tenant)
 {
     try
     {
         using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities())
         {
             db.tenant_tbl.Add(tenant);
             db.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 3
0
 public static void UpdateTenantDetails(tenant_tbl tenant)
 {
     try
     {
         using (HomeCommitteeDBEntities db = new HomeCommitteeDBEntities())
         {
             db.Entry(tenant).State = System.Data.Entity.EntityState.Modified;
             db.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }