public ResponseViewModel Delete(int id) { var response = new ResponseViewModel(); var actionType = _actionTypeDal.GetActionType(p => p.Id == id); if (actionType == null) { response.IsSuccess = false; response.Message = "ActionType bulunamadı."; return(response); } actionType.IsDeleted = true; _actionTypeDal.Update(actionType); var saving = _actionTypeDal.SaveChanges(); if (!saving) { response.IsSuccess = false; response.Message = "ActionType silme işlemi sırasında hata oluştu."; return(response); } response.Data = actionType; return(response); }
public IResult Update(ActionType actionType) { _actionTypeDal.Update(actionType); return(new SuccessResult(Messages.Updated)); }