public async Task DeleteManyAsync(DeleteMany m) { foreach (string id in m.Id.Where(x => x != null)) { await _rep.DeleteAsync(id); } }
public static DataContracts.DeleteResult DeleteMany <T>(string collectionName, FilterDefinition <T> filter, Notification notification = null) { var request = new DeleteMany { CollectionName = collectionName, OutputMode = JsonOutputMode.Strict, Filter = filter.ToJson(), Notification = notification, CultureCode = CultureInfo.CurrentCulture.Name }; var response = Send <DeleteManyResponse>("entities/" + collectionName + "/bulk", request, "DELETE"); return(response.Result); }
public async Task <IActionResult> DeleteMany(DeleteMany m) { await _service.DeleteManyAsync(m); return(RedirectToAction("Many")); }