Exemplo n.º 1
0
        public async Task <string> Delete(DeleteLoggingRequest request)
        {
            if (request.Ids == null)
            {
                request.Ids = new List <string>();
            }

            int count = 0;

            foreach (string id in request.Ids)
            {
                Logging existLogging = await loggingRepository.GetByIdAsync(ObjectId.Parse(id));

                if (existLogging != null)
                {
                    await loggingRepository.DeleteAsync(existLogging.Id);

                    count++;
                }
            }
            return($"Đã xóa {count} đối tượng. ");
        }