I would like to send a group of id's or null into this repository and have it return the full list, or a list that contains the ids.
What would be the best way to do this? the UI control sets value would be something like "1411,1413" but when there is no value i want to return all the data. Its like I need an or after the Contains
UI
if ($('#ddlGuidelines').val()) {
selectedGuidelineIds = $('#ddlGuidelines').val().toString();
}
$.ajax({
type: "POST",
url: '/Public/Reports/Handlers/Downloads.ashx',
data: { GuidelineIds": selectedGuidelineIds, "Action": "ByLinkTypes" },
middle Teir
public Nullable<int> Id{ get; set; }
public Model.FilterOptions GetOptionsByIds(List<int?> Ids)
{
using (var db = new DLEntities())
{
var list = (from pg in db.list
where Ids.Contains(pg.Id)