public async Task AddCompany(CompaniesDto AddCompany)
        {
            await _companyRepository.Add(_Mapper.Map <Companies>(AddCompany));

            await _companyRepository.Commit();

            await _companyRepository.DisposeAsync();
        }
        public async Task <IActionResult> CompanyEdit(CompaniesDto model)
        {
            if (ModelState.IsValid)
            {
                await _companyService.EditCompany(model);
            }
            else
            {
                ModelState.AddModelError("", "Güncellerken Hata Oluştu");
            }



            return(RedirectToAction("CompanyList", "Company"));
        }
        public async Task <IActionResult> CompanyAdd(CompaniesDto model)
        {
            if (ModelState.IsValid)
            {
                await _companyService.AddCompany(model);

                return(RedirectToAction("CompanyList", "Company"));
            }
            else
            {
                ModelState.AddModelError("", "Kayıt Ederken Hata Oluştu");
            }

            return(View());
        }
 public async Task EditCompany(CompaniesDto editCompanyDTO)
 {
     _companyRepository.Update(_Mapper.Map <Companies>(editCompanyDTO));
     await _companyRepository.Commit();
 }