My model contains an entity Order with a non-nullable property Amount of type decimal:
cf:entity name="Order">
<cf:property name="Id" />
<cf:property name="Amount" typeName="decimal" defaultValue="0" nullable="false" />
</cf:entity>
I can not save an instance of this entity with the value 0 for the property Amount, because when calling "Order.Save()" I get the error "Procedure or function 'Order_Save' expects parameter '@Amount', which was not supplied." from SQL-Server.
Everything goes fine if I give the parameter the default value 0 in the stored procedure:
ALTER PROCEDURE [dbo].[Order_Save]
(
@Amount [decimal] (28, 13) = 0,
...
How can I instruct CodeFluent to generate a stored procedure with the default value 0 for the Amount parameter? Or do you know another solution?
Kind regards
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…