Hi,
I'm currently evaluating NetTiers and so far I've been very impressed by what I've seen. I was testing the generated WebServiceClient code on a simple application I've made. I was suprised to find that when I use the generated provider to Get an Entity using its unique primary key, the generated provider class does not check for null return which leads to a NullReferenceException later on. Here's the code:
public override DTS.Entities.Timesheet GetByTimesheetID(TransactionManager transactionManager, System.Guid timesheetID, int start, int pageLength, out int count)
{
WsProxy.DTSServices proxy = new WsProxy.DTSServices();
proxy.Url = Url;
WsProxy.Timesheet items = proxy.TimesheetProvider_GetByTimesheetID(timesheetID, start, pageLength, out count);
return Convert(items);
}
If the enitity doesn't exists, the item becomes null which leads to a crash in the Convert method. Does anyone know if it is intentional for NetTiers to generate a NullReferenceException if the Entity doesn't exist? I would have expected a null return.
Is this intentional or is it a bug?
Cheers,
Kim