public int Insert(EServicesProxies EServiceProxy) { try { using (var db = new HCMEntities()) { db.EServicesProxies.Add(EServiceProxy); db.SaveChanges(); return(EServiceProxy.EServiceProxyID); } } catch (Exception ex) { throw ex; } }
public int Revoke(EServicesProxies EServiceProxy) { try { using (var db = new HCMEntities()) { EServicesProxies EServiceProxyObj = db.EServicesProxies.FirstOrDefault(x => x.EServiceProxyID.Equals(EServiceProxy.EServiceProxyID)); EServiceProxyObj.EServiceProxyStatusID = EServiceProxy.EServiceProxyStatusID; EServiceProxyObj.EndDate = EServiceProxy.EndDate; EServiceProxyObj.IsActive = EServiceProxy.IsActive; EServiceProxyObj.LastUpdatedDate = EServiceProxy.LastUpdatedDate; EServiceProxyObj.LastUpdatedBy = EServiceProxy.LastUpdatedBy; return(db.SaveChanges()); } } catch (Exception ex) { throw ex; } }