This repository was archived by the owner on Apr 11, 2024. It is now read-only.
  
  
  
  
What is the purpose of IPipelineBehavior in the following code? #349
-
| 
         I don't understand the meaning of following code. Why do you use the following code in Startup.cs of Enrollment.API project?   public void ConfigureServices(IServiceCollection services)
  {
            services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
  } | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            ratanparai
          
      
      
        Apr 9, 2021 
      
    
    Replies: 1 comment 1 reply
-
| 
         Here is a good article to read about the use cases of  The code snippet inject the LoggingBehavior to the service so that  I hope this will help.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        mahedee
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Here is a good article to read about the use cases of
IPipelineBehavior- https://lurumad.github.io/cross-cutting-concerns-in-asp-net-core-with-meaditrThe code snippet inject the LoggingBehavior to the service so that
MediatRcan find our logging behavior before calling the handlersI hope this will help.