Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,


Strongly typed custum classes can be Replaced with Generic Classes, While Retriving the data from SQlserver/oracle... eg If we have 50,000 Records Using datasets will be more TimeConsuming!!! , of course by writing sql query using ROW_NUMBER() keyword

Can any one guide me how can we USE generics instead srongly typed custum classes...

in BusinessLogic Layer...

is this correct way to define generics class?

fOr eg:we have property class like this
C#
Public Class Student
{
private string _Name;
   public string Name
   {
     get
     {
       return _Name;
     }
     set
     {
       _Name = value;
     }
   }

private string _LocationName;

 public string Location_Name
   {
     get
     {
       return _LocationName;
     }
     set
     {
       _LocationName = value;
     }
  } 

---------------------
C#
Public Class StudentList: List<Student>
{  }


AND then in DAL of course we can use this to Class to Retrive Results

I have gone thourgh the Aritcles oF IMAR SPANJARS 3 teir Arcitecture.. suggest me improved one...

Is this Enough to implement Generics class in BL layer???


How can impose constraints in Generic Classes??
Posted

1 solution

 
Share this answer
 
Comments
shashavali 2-Jul-12 9:52am    
Thank you for providing such a valuable link

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900