コード例 #1
0
 public IActionResult Edit(int id)
 {
     return(View(companyDomainService.Get(id)));
 }
コード例 #2
0
ファイル: Scrap.cs プロジェクト: hatefi-arman/Modules
        //================================================================================
        private void validateCompanyExistance(Company secondParty, ICompanyDomainService companyDomainService)
        {
            Company fetchedCompany = companyDomainService.Get(secondParty.Id);

            if (fetchedCompany == null)
            {
                throw new ObjectNotFound("Company Not Found");
            }
        }
コード例 #3
0
ファイル: Offhire.cs プロジェクト: hatefi-arman/Modules
        //================================================================================
        private void validateCompanyExistance(Company introducer, ICompanyDomainService companyDomainService)
        {
            if (introducer == null)
                throw new BusinessRuleException("", "The Offhire Registrar Company must be selected.");

            if (companyDomainService.Get(introducer.Id) == null)
            {
                throw new ObjectNotFound("Company Not Found");
            }
        }