Audit Trail Component net standard 2 1 Full Source Code

Original price was: $10.00.Current price is: $5.00.

Why should buy from us

  • 100% Legit and Clean Code : Receive fully legitimate and clean code directly from the original source, ensuring reliability and security for your projects.
  • Instant Payments via Crypto : Enjoy seamless, instant transactions using cryptocurrency, eliminating delays and providing a secure payment experience.
  • Global Accessibility : Accept payments from customers worldwide without the hassle of currency conversion or international transaction fees.
  • Secure and Transparent Transactions : Benefit from the security and transparency of blockchain technology, protecting your transactions from fraud and ensuring trust.
  • High-Quality Scripts : Get high-quality, well-documented scripts tailored to your needs, backed by direct support from the original developers.

More Information

  • Code Delivered in 24 Hours : Receive your code within 24 hours, directly from the original store.
  • 100% Authentic Code : Get 100% genuine code sourced directly from ThemeForest.net and CodeCanyon.net.
  • Affordable Pricing : Our prices are competitive because the code is shared by individuals who purchase directly from the original marketplaces.
  • Chat or Email for Details : Contact us via chat or email for more information and to learn how we ensure quality and authenticity.

Description

Audit Trail Component Full Source Code Version v1 0 Introduction Audit trail component stores database actions Add Update Delete business actions you can specify them sends notifications and logs its own errors also it s dynamic as it gives user the ability to specify Business actions Emails that notifications will be sent to Notification s subject and Notification s Message also you can search for all the data has been stored by the component by predefined methods Framework net standard 2 1 Packages Microsoft EntityFrameworkCore SqlServer 3 1 3 Newtonsoft Json 12 0 3 Hangfire Packages Hangfire AspNetCore Hangfire SqlServer Features Store database actions and business actions Send notifications Log send notification process and retry if it s failed Log errors Dynamic User can specify actions and emails and specify if the component should send notification when a specific action happened Recommendation use background job to execute component methods to ensure that the original request time will not be increased Database Tables Audit Action to store actions lookup data Audit ActionUserGroup to make relation between action and emails so if this action happened then the component will send notification to the related emails with the specified message Audit AuditTrail to store the audit data Audit ErrorLog to log the component errors Audit Notification to store the notifications that the component will send to emails Audit NotificationLog to log the send notification process component will store every send email retry and store if it s done successfully or not with error message How to Register In your project you need to install Hangfire nugetpackages Hangfire AspNetCore Hangfire SqlServer or any package to perform background processing Also you need to implement IEmailService interface to send notification emails Startup class In method ConfigureServices region hangfire Add Hangfire services services AddHangfire configuration configuration SetDataCompatibilityLevel CompatibilityLevel Version_170 UseSimpleAssemblyNameTypeSerializer UseRecommendedSerializerSettings UseSqlServerStorage Configuration GetConnectionString DefaultConnection new SqlServerStorageOptions CommandBatchMaxTimeout TimeSpan FromMinutes 5 SlidingInvisibilityTimeout TimeSpan FromMinutes 5 QueuePollInterval TimeSpan Zero UseRecommendedIsolationLevel true UsePageLocksOnDequeue true DisableGlobalLocks true Add the processing server as IHostedService services AddHangfireServer endregion region Audit services AddScoped IEmailService EmailService AddAuditTrail classes services AddAuditTrail Configuration GetConnectionString DefaultConnection new List AuditActionDto new AuditActionDto ActionCode CreateOrder SendNotification true NotificationFromEmail admin gmail com NotificationEmails ahmed yahoo com ali hotmail com NotificationSubject subject NotificationMessage sample message new AuditActionDto ActionCode DeleteOrder SendNotification true NotificationFromEmail admin gmail com NotificationEmails ahmed2 yahoo com ali2 hotmail com NotificationSubject subject NotificationMessage sample message2 new AuditActionDto ActionCode UpdateOrder SendNotification true new AuditActionDto ActionCode NewUpdateOrder SendNotification false register background job to Check Notifications to send emails var sp services BuildServiceProvider CreateScope ServiceProvider var notificationService sp GetService INotificationPublicService JobStorage Current new SqlServerStorage Configuration GetConnectionString DefaultConnection new SqlServerStorageOptions CommandBatchMaxTimeout TimeSpan FromMinutes 5 SlidingInvisibilityTimeout TimeSpan FromMinutes 5 QueuePollInterval TimeSpan Zero UseRecommendedIsolationLevel true UsePageLocksOnDequeue true DisableGlobalLocks true RecurringJob AddOrUpdate notificationService CheckNotificationsAndSend Cron Daily endregion How to create tables Open Package manager console and in the Default project list select AuditTrailComponent project Write the below commands add-migration InitiatAudit -context AuditDbContext update-database -context AuditDbContext How to use Inject this interface to your class IAuditTrailService To store business action BackgroundJob Enqueue AuditTrailService SaveCustomActionsAuditTrailAsync DeleteOrder sample data by hangfire username1 To store database action use the below code before Entity framework save changes method BackgroundJob Enqueue AuditTrailService SaveDbActionsAuditTrailAsync ApplicationDbContext ChangeTracker Entries Select a new DatabaseChangesDto Entity a Entity OriginalValues a OriginalValues ToObject CurrentValues a CurrentValues ToObject ToList To search for audit data Inject this interface IAuditTrailService AuditTrailFilterDto model new AuditTrailFilterDto Audit_ActionCode DeleteOrder var result await AuditTrailService Search model To search for Notifications Inject this interface INotificationPublicService NotificationFilterDto model new NotificationFilterDto Audit_ActionCode DeleteOrder var result await NotificationPublicService SearchNotifications model to search for notification log Inject this interface IErrorLogPublicService NotificationLogFilterDto model new NotificationLogFilterDto var result await NotificationService SearchNotificationLogs model to search for error logs Inject this interface IErrorLogPublicService ErrorLogFilterDto model4 new ErrorLogFilterDto var result await ErrorLogPublicService Search model4