Hey Everyone..
i need to return the Ilist corresponding to the cases.
i have a problem in switch.
1- when i m Returning a value , it gives error ("Not all
paths return a value")
and
2- when i put return outside the switch block or outside the
case ,it gives error ("the retval doesnt exist in the current
context")
please help ..
public object GetAll(object _oplObj)
{
using (NHibernate.ISession session = OpenSession())
{
using (ITransaction transaction =
session.BeginTransaction())
{
ICriteria crit =
session.CreateCriteria(_oplObj.GetType());
switch (_oplObj.GetType().ToString())
{
case "IMS":
break;
case "TPF":
IList<Jinnah.ObjectPersistanceLayer.TPF>
retval = crit.List<Jinnah.ObjectPersistanceLayer.TPF>();
return retval;
break;
}
}
}
}
--
You received this message because you are subscribed to the Google Groups
"NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhcdevs?hl=en.