public class DBComponent{ public delegate void IDataReaderHandler(IDataReader reader); public static void GetAuthor(string authorID,IDataReaderHandler handler){ using(SqlConnection conn=new SqlConnection("server=.;Trusted_Connection=True;DATABASE=pubs")){ SqlCommand command=new SqlCommand("select * from class where [id]=@ID",conn); command.Parameters.AddWithValue("@ID",authorID); conn.Open();