Exemplo n.º 1
0
        public async Task Delete(int manhanvien)
        {
            var auditTrailLog = new RequestCustomerLog()
            {
                Action    = "DELETE",
                log       = "Xóa nhân viên có mã nhân viên là " + manhanvien.ToString() + " vào table NhanVien",
                Timestamp = DateTime.Now
            };

            string text = auditTrailLog.Action + " | " + auditTrailLog.log + " | " + auditTrailLog.Timestamp;
            string path = @"D:\Thế giới di động\hddtRestfulAPI\log.txt";

            System.IO.File.AppendAllText(path, text + Environment.NewLine);
            await _repository.DeleteByMaNhanVien(manhanvien);
        }