public async Task <UpdateResult> Update(ServiceManagerEntity serviceManager) { var update = new UpdateDefinitionBuilder <ServiceManagerEntity>() .Set(x => x.RunningServices, serviceManager.RunningServices) .Set(x => x.UpdatedBy, serviceManager.UpdatedBy) .Set(x => x.LastUpdated, DateTime.Now); return(await _erviceManagersCollection.UpdateOneAsync(x => x.Id == serviceManager.Id, update)); }
public async Task Create(ServiceManagerEntity serviceManager) { serviceManager.Created = DateTime.Now; serviceManager.Deleted = false; await _erviceManagersCollection.InsertOneAsync(serviceManager); }
public async Task Restart([FromBody] ServiceManagerEntity entity) { await _serviceManager.RestartService(entity); }
public Task RestartService(ServiceManagerEntity managerEntity) { throw new NotImplementedException(); }
public async Task Stop([FromBody] ServiceManagerEntity entity) { await _serviceManager.StopService(entity); }