c# - Passing multiple array values to a web api controller using a single model attribute -


i have $scope object bellow

$scope.array=[{"id":"1","id":"2","id":"3"}]; 

what want pass these values following sql query

select * table id in("here need above 3 values 1 after another") 

how can this?

create class

public class myid {   public int id {set;get;} } 

pass web api

public void submitid(list<myid> ids){   // rest of things   var id = string.join(",", ids.select(x => x.id).toarray());   var query="select * table id in('"+id+"')";  } 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -