WHERE IN (matriz de IDs)
Eu tenho webservice que é passado uma matriz de ints. Eu gostaria de fazer a instrução select como segue, mas continue recebendo erros. Preciso alterar a matriz para uma string?
[WebMethod]
public MiniEvent[] getAdminEvents(int buildingID, DateTime startDate)
{
command.CommandText = @"SELECT id,
startDateTime, endDateTime From
tb_bookings WHERE buildingID IN
(@buildingIDs) AND startDateTime <=
@fromDate";
SqlParameter buildID = new SqlParameter("@buildingIDs", buildingIDs);
}