Hi All,
I’m thinking in this line of code
IDataReader myReader = questDatabase.ExecuteReader(getQuest);
I’m using DAAB but I can’t understand how and what’s the meaning of the fact the method ExecuteReader(DbCommand) returns an IDataReader Interface.
Anyone can Explain, Please
It allows you to you DataReader without the need of knowing which type of DataReader you are using (i.e.
SqlDataReader, OleDbDataReader, EtcDataReader), so if someday you want to change the datareader you are using it won’t impact you logic, in other words it gives you abstraction. For example :you can use
without knowing which provider you are using
it can be:
or it can be
or whatever.
EDIT:
You can also use the DBFactories.
and then create your provider in other layer