Пример #1
0
 public async Task DeleteManyAsync(DeleteMany m)
 {
     foreach (string id in m.Id.Where(x => x != null))
     {
         await _rep.DeleteAsync(id);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
        public async Task <IActionResult> DeleteMany(DeleteMany m)
        {
            await _service.DeleteManyAsync(m);

            return(RedirectToAction("Many"));
        }