is same type ?

Posts   
 
    
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 09-Apr-2008 12:30:06   

Dear all

I have an Entity named table1

What is the deferent between "EntityCollection<table1>" and "table1Entity"

This issue for create overloading method that one accept return type "EntityCollection<table1>" and other "table1Entity"

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Apr-2008 15:30:24   

Table1Entity represents one entity (maps one row from the database table).

Where EntityCollection<Table1Entity> represents a generic collection of entities having type of Table1Entity, in other words it's a collection or an array of Table1Entity objects. (maps a set of rows from the database table)

mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 09-Apr-2008 15:43:49   

hi walaa this is mohamed magdy from egypt and one of Omar Elshraim team member

i want to ask about generic

EntityCollection<Table1Entity> is generic Table1Entity in non generic

if i have a method that will be overloading one for return type EntityCollection<Table1Entity> and second for Table1Entity but i know in overloading must be same return type

and in this case the dot net framework accepted it

i want to kwon if it same type or not ?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Apr-2008 17:15:26   

EntityCollection<Table1Entity> and Table1Entity are not of the same type, if that's what you are asking.