I'm not sure what I'm doing incorrectly to cause this exception. My factory method is as follows:
public static async Task UpdateSettingValueAsync(byte levelId, bool isActive)
{
var criteria = new SettingCriteria();
criteria.LevelId = levelId;
criteria.IsActive = isActive;
await DataPortal.UpdateAsync(criteria);
}
And the actual DP method is as follows:
[RunLocal]
private void DataPortal_Update(SettingCriteria criteria) { ... }
When the line "await DataPortal.UpdateAsync(criteria)" is called in the factory method, I get a NullReferenceExcpetion. It's like it can't find a DataPortal_Update method that has as its parameter a SettingCriteria object.
Should I be able to call an async DP_Update method without expecting to get a return type back?
No - the dataportal method must be async and return a Task.
Copyright (c) Marimer LLC