I do not think there is any way to do it by passing a list of Ids as a parameter because EF tries to interpret it as a single parameter. What worked for me was the following:
Given a list of IDs: 1,2,3
Convert the list into an array of objects so that you can pass as an argument into FromSql as that accepts params object[] and EF core will treat them as separate parameters.
Construct a query that will create separate parameters for each item in the list of IDs so that you end up with a query that looks like the following:
"SELECT * from VwCampaigns where PmcId in ({0},{1},{2})"
My working code:
var pmcIds = new List<int> { 1,2,3 }.Select(x => (object)x).ToArray();
var sqlQuery = $"SELECT * FROM dbo.VwCampaigns WHERE Id in ({string.Join(',', pmcIds.Select(x => $"{{{Array.IndexOf(pmcIds, x)}}}"))})";
var results = _dbContext.CampaignsView.FromSql(sqlQuery, pmcIds).ToList();
Alternatively you can use a SQL command like so: Mark Byers' Answer