public JsonResult <APIResultEntities <bool> > Delete(Guid id) { APIResultEntities <bool> rs = new APIResultEntities <bool>(); try { _iAccountServices.DeleteAccount(id); rs.Data = true; rs.ErrCode = ErrorCodeEntites.Success; rs.ErrDescription = string.Format(Constants.MSG_DELETE_SUCCESS, Constants.Account); } catch (Exception ex) { rs.Data = false; rs.ErrCode = ErrorCodeEntites.Fail; rs.ErrDescription = ex.ToString(); throw new Exception(ex.ToString()); } return(Json(rs)); }
public IActionResult DeleteAccount(string login) { var sucessCheck = _accountServices.DeleteAccount(login); return(Ok(sucessCheck)); }