I am unable to specify parameters to my object's DataPortal_Fetch method. I seem to have read somewhere that this method should accept parameter of any built-in type (int, string...) or criteria objects.
protected override void DataPortal_Create(MyCriteria Criteria)
//TODO: load default values
//omit this override if you have no defaults to set
change values here
I tried that but I always get the following compile error:
(DataPortal_Create()) no suitable method found to override.
The problem does not seem to be the type of parameter but the syntax of the method's declaration. I tried using the same private declaration as used for the other data access methods (private void) but that did not work either. What I am not doing or doing wrong? Any lead would be appreciated.
There is only one DataPortal_Create in the base class, and it takes no parameter.
You can only override a method if it exists in the base class - that's the way C# and VB work.
So if you declare a DataPortal_Create that has a parameter, then there is no corresponding base class method, so there's nothing to override.
In that case you just do this:
private void DataPortal_Create(MyCriteria criteria)
This works! Thanks Rocky,
I did try this yesterday but it was not working. Must have had a typo or something.
What a difference a day makes.
Copyright (c) Marimer LLC