public async Task <IActionResult> AppraisalStore(Appraisal request)
        {
            //if (_userRepository.LogCurrentUser().role != "Administrator")
            //    return Unauthorized(_UnAuthorized);

            RequiredFields model = new RequiredFields();

            model.Appraisal = request;
            object validateFields = _validationService.ValidateRequest("Appraisal", model);

            if (JsonConvert.SerializeObject(validateFields).Length > 2)
            {
                return(BadRequest(validateFields));
            }

            try
            {
                var response = _appraisalRepository.Add(request);
                if (response == false)
                {
                    return(BadRequest(new GenericResult {
                        Response = response, Message = request.name + " already exists"
                    }));
                }
                else
                {
                    return(Ok(new GenericResult {
                        Response = response, Message = request.name + " has been successfully added"
                    }));
                }
            }
            catch (Exception e)
            {
                return(BadRequest(e));
            }
        }
 public void CreateAppraisal(Appraisal appraisal)
 {
     appraisalsRepository.Add(appraisal);
 }