Example #1
0
        public IActionResult Delete(int id)
        {
            var result = _renterService.Delete(id);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #2
0
        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);
        }