first check if your SP (Stored procedure) is returning any results.
Secondly, try to change the line:
gln.Name = (string)reader["CollectionType.Name"];
for
gln.Name = (string)reader["Name"];
And if the previus solutions don't work, obviously the name of the returned data is givin you an error, so try to use a Alias for each column of your SP, for example:
CREATE PROCEDURE [dbo].[GetColletcion]
AS
BEGIN
select CollectionType.Name ,GlassesCollection.Name
from GlassesCollection
inner join CollectionType
on GlassesCollection.CollectionType=CollectionType.CollTypeID
END
change to
CREATE PROCEDURE [dbo].[GetColletcion]
AS
BEGIN
select CollectionType.Name AS CollectionName ,GlassesCollection.Name AS GlassesName
from GlassesCollection
inner join CollectionType
on GlassesCollection.CollectionType=CollectionType.CollTypeID
END
and modify your mapping like this:
gln.Name = (string)reader["GlassesName"];
Cheers :D