public virtual void UnlockServiceRegistry(string name) { ServiceRegistryLock regLock = ServiceRegistryRepository.OneServiceRegistryLockWhere(c => c.Name == name); if (regLock != null) { regLock.Deleted = DateTime.UtcNow; regLock.Modified = regLock.Deleted; regLock.ModifiedBy = UserName; ServiceRegistryRepository.Save(regLock); } }
public bool IsLocked(string name, out ServiceRegistryLock theLock) { theLock = ServiceRegistryRepository.OneServiceRegistryLockWhere(c => c.Name == name && c.Deleted == null); return(theLock != null); }