public override int DeleteProxyEntity(int id) { var entity = ProxyUriEntities.Find(id); if (entity != null) { ProxyUriEntities.Remove(entity); return(SaveChanges()); } return(0); }
public override int DeleteProxyEntity(string host, int port) { var entity = ProxyUriEntities.FirstOrDefault(p => p.Host == host && p.Port == port); if (entity != null) { ProxyUriEntities.Remove(entity); return(SaveChanges()); } return(0); }