I have a simple business object ("Test"), which has a property named "Key".
I would like to be able to get the object using the key, so I added a criteria named "Key".
When I call Test.GetByKey("ABC") I get the following error message when the stored procedure is called:
SqlException (0x80131904): Procedure or function 'mas_GetTest' expects parameter '@TestID', which was not supplied.]
I can get around this problem by adding the following code to Test.ExecuteFetch:
if (criteria.Id == null)
cmd.Parameters.AddWithValue("@TestID", DBNull.Value);
else
cmd.Parameters.AddWithValue("@TestID", criteria.Id);
Will this problem be solved in the next release?