CSLA Template suggestion

CSLA Template suggestion

Old forum URL: forums.lhotka.net/forums/t/2247.aspx


sune42 posted on Wednesday, January 31, 2007

hi

For the templates, I would suggest that there's some code added to handle the cases when you do a get/fetch , but there's no data in the DB found, like adding if the DataReader actually has some valid data to read:

private void FetchObject(SafeDataReader dr)
{
if (dr.Read())
{
   _settingName = dr.GetString(
"SettingName");
  _value = dr.GetString("Value");
  _description = dr.GetString(
"Description");
}

else

{

///Do some handling of Data not found

}

}

Personally,  I don't know how I should handle data-not-found issues, anyone who can help out?

and perhaps also include that into the templates?

sune42 replied on Wednesday, January 31, 2007

The issue above is for a "Editable Root Object".

Copyright (c) Marimer LLC