Tuesday, June 2, 2015

When an object inherits from IHydratable given the DotNetDuke paradigm...

You have to implement KeyID as a getsetter for an int. This could use another field, public or private, for getting and setting if need be obviously. You will also have to implement the Fill method for mapping what comes back from a SELECT-flavored sproc to the POCO like this:

public void Fill(System.Data.IDataReader dataReader)
{
   KeyID = Convert.ToInt32(dataReader["FooId"]);
   SomethingMore = dataReader["Whatever"] as string;
}

No comments:

Post a Comment