Exemplo n.º 1
0
        public async Task <bool> DeleteTeamAsync(string id)
        {
            try
            {
                await TeamCollection.DeleteOneAsync(a => a.Id == id).TimeoutAfter(TimeoutMilisec);

                return(true);
            }
            catch (TimeoutException e)
            {
                Log.Error("Received time out for deleting team async => ", e);
                return(false);
            }
            catch (Exception e)
            {
                Log.Error("Failed to delete team async => ", e);
                return(false);
            }
        }