public async Task <Department> CreateAsync(DepartmentCreateRequestViewModel request)
        {
            Department department = new Department()
            {
                Code = request.Code,
                Name = request.Name
            };
            await _unitOfWork.DepartmentRepository.CreateAsync(department);

            if (await _unitOfWork.DepartmentRepository.SaveAsync())
            {
                return(department);
            }
            throw new ApplicationValidationException("Some problem with delete data");
        }
 public async Task <ActionResult> CreateAsync([FromForm] DepartmentCreateRequestViewModel department)
 {
     return(Ok(await _departmentService.CreateAsync(department)));
 }