Ok I made the change in my above post and it is correctly adding the parameters. Now.... This is the problem.
It generates this method:
///
<summary>
/// Construct a Aggregators object from OUT and IN/OUT parameters.
///
</summary>
internal
sealed
class
GetAggregatorsByCustomerIdFactory :
ISimpleDomainObjectFactory<Aggregators>
{
public
Aggregators Construct(Database db,
DbCommand command)
{
Aggregators aggregators =
new
Aggregators();
aggregators.Address =
CastDBValue.ToRequired<String>(db, command,
"Address");
aggregators.Address =
CastDBValue.ToRequired<String>(db, command,
"ContactAddress");
aggregators.Address2 =
CastDBValue.ToRequired<String>(db, command,
"Address2");
aggregators.Address2 =
CastDBValue.ToRequired<String>(db, command,
"ContactAddress2");
aggregators.AggregatorId =
CastDBValue.ToRequired<Int32>(db, command,
"AggregatorId");
aggregators.AggregatorName =
CastDBValue.ToRequired<String>(db, command,
"AggregatorName");
aggregators.AlternatePhone =
CastDBValue.ToRequired<String>(db, command,
"AlternatePhone");
aggregators.City =
CastDBValue.ToRequired<String>(db, command,
"City");
aggregators.City =
CastDBValue.ToRequired<String>(db, command,
"ContactCity");
aggregators.ContactPerson =
CastDBValue.ToRequired<String>(db, command,
"ContactPerson");
aggregators.ContactState =
CastDBValue.ToRequired<String>(db, command,
"ContactState");
aggregators.ContactTitle =
CastDBValue.ToRequired<String>(db, command,
"ContactTitle");
aggregators.ContactZip =
CastDBValue.ToRequired<String>(db, command,
"ContactZip");
aggregators.CustomerId =
CastDBValue.ToRequired<Int32>(db, command,
"CustomerId");
aggregators.DeliveredkW =
CastDBValue.ToOptional<Nullable<Double>>(db,
command, "DeliveredkW",
null);
aggregators.Phone =
CastDBValue.ToRequired<String>(db, command,
"Phone");
aggregators.State =
CastDBValue.ToRequired<String>(db, command,
"State");
aggregators.Zip =
CastDBValue.ToRequired<String>(db, command,
"Zip");
return aggregators;
}
}
But the stored procedure just returns a result set. CastDBValue has an overload to use a datareader instead of a dbcommand, im going to check into that.
Is there a more stable release for 2.0 that I should be using? This one seems to be right in the middle of development.
|