public ResponseEntity <Request> Delete([FromBody] Request requestdata) { try { _accountRepository.Delete(x => x._id == requestdata._id); return(new ResponseEntity <Request> { Responsecode = 1, ResponseMessage = "Success!", Entity = null, EnityList = null }); } catch (Exception) { return(new ResponseEntity <Request> { Responsecode = 0, ResponseMessage = "Error during Deleting records!", Entity = null, EnityList = null }); } }
public ResponseEntity <Users> delete(ObjectId id) { try { _accountRepository.Delete(x => x.InternalId == id); return(new ResponseEntity <Users> { Responsecode = 1, ResponseMessage = "Success!", Entity = null, EnityList = null }); } catch (Exception) { return(new ResponseEntity <Users> { Responsecode = 0, ResponseMessage = "Error during Deleting records!", Entity = null, EnityList = null }); } }