public Int32 Create(devices obj) { EDM edm = new EDM(); edm.devices.Add(obj); try { edm.SaveChanges(); return(obj.id); } catch (Exception ex) { throw ex; } }
public bool Delete(devices obj) { EDM edm = new EDM(); edm.Entry(obj).State = System.Data.Entity.EntityState.Deleted; try { edm.SaveChanges(); return(true); } catch (Exception ex) { throw ex; } }
public bool Update(logs obj) { EDM edm = new EDM(); edm.Entry(obj).State = System.Data.Entity.EntityState.Modified; try { edm.SaveChanges(); return(true); } catch (Exception ex) { throw ex; } }