public Owner Get(OwnerId ownerId)
        {
            using (var context = new BakeryContext())
            {
                var dto = context
                    .Owners
                    .Find(ownerId.Id);

                return dto == null ? null : Mapper.ToDomainObject(dto);
            }
        }
        public void Initialization()
        {
            _address = Address.FromNative("Example Street", "00-000", "Warsaw", "PL");
            _name = "Cookie Dominiak";
            _nationalEconomyRegister = "123456789";
            _taxIdentificationNumber = "987654321";
            _phone = new Phone("48", "22", "1234567");
            _ownerId = new OwnerId(Guid.NewGuid());

            _owner = new Owner(_ownerId)
            {
                Address = _address,
                Name = _name,
                NationalEconomyRegister = _nationalEconomyRegister,
                TaxIdentificationNumber = _taxIdentificationNumber
            };

            _owner.Phones.Add(_phone);
        }
 public Owner Get(OwnerId ownerId)
 {
     return OwnerRepository.Get(ownerId);
 }