With BLToolkit, it's very easy to map from a stored procedures output to an object, but can it be done the other way? To go from an object to a stored procedures input, such that each of an objects properties becomes a parameter
I'd like to be able to do something like this:
[SprocName("sp_name")]
public abstract void InsertViaSproc(int param1, int param2,
SomeObject restOfParams);
public class SomeObject
{
[MapField("param3")] int param3;
[MapField("param4")] string param4;
}
with a stored procedure
CREATE PROCEDURE sp_name(
@param1 int,
@param2 int,
@param3 int,
@param4 varchar(50))
AS
--The rest
Is this possible with BLToolkit out of the box? Or would I have to modify the source to achieve this?