Receive a number through a Stored Process c#

Asked

Viewed 20 times

0

I have an object that has properties of various types and one of them is a List <int? >, however when executing a precedent it returns me only one number, does it work if I remove the list and leave only int? , only that I really need a list because elements of this list will be added. the error that this giving is:

Error Parsing column 28 (Imoid=22 - Int32)

class property: public List< int?> ImoId { get; set; }
Call to Sprocedure:

var bookings = db.Query<BookingEntity>("Sp_061_Int_Plat_Booking01", commandType: CommandType.StoredProcedure, commandTimeout: 600);
return bookings;

How do I get a whole one just on this property?

Using Imapper

  • How you set your mapper to receive your Bookingentity class?

  • Yes, but the property is an int List, and what comes from the Procedure is only an int. In fact it was modified to be a List, before it was an int and normal function, now a table has been created for this. and the customer does not want to change the model.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.