Example #1
0
        public Result Add(Customer customer)
        {
            if (!isExist(customer.Tc, customer.CompanyId))
            {
                return(new Result(false, "Kullanıcı mevcut"));
            }
            var companyName = _company.Get(customer.CompanyId).Name;

            if (companyName == CompanyNames.Starbucks)
            {
                return(_starbucks.Add(customer));
            }
            else
            {
                return(_portal.Add(customer));
            }
        }