public IActionResult Delete(int id) { var result = _renterService.Delete(id); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public void Delete(string ids) { var idList1 = ids.Trim(',').Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(p => int.Parse(p)).ToList(); foreach (var item in idList1) { var entity = _personRepository.GetById(item); entity.Deleted = true; entity.SyncStatus = false; _personRepository.Delete(entity); } _renterService.Delete(ids); }