Sanjay Sharma

Sanjay Sharma

  • 1.2k
  • 409
  • 25.4k

Why static method avoided in web application

Sep 23 2019 11:17 PM
I learned ( How I don't know) that static method should be avoided in web application.
 
Let suppose a DAL layer is like the code as bellow -
  1. namespace XXX.DAL  
  2. {  
  3.     public static List<CompanyMaster> GetAllCompanies()  
  4.     {  
  5.        // code return collection of CompanyMaster  
  6.     }  
  7. }
so can anyone help me why should I avoid desgin of static here. I search google but do not find anything good stuff around this.

Answers (2)