Beispiel #1
0
        public async Task <long> AddAddressAsync(Address address)
        {
            ValidateNotNull(address);
            await ValidateUniqueId(_addressDao, address.Id);

            if (address.City != null && address.CityId <= 0)
            {
                address.CityId = address.City.Id;
            }

            await ValidateId(_cityDao, address.CityId);

            return((await _addressDao.FluentInsert(address).ExecuteAsync()).FirstOrDefault());
        }