Exemple #1
0
        public long?AddAddressSet(ViewAddress v, Guid userId)
        {
            Trace.Assert(_db != null);
            Trace.Assert(v != null);
            ObjectResult <long?> result =
                _db.AddAddressSet(v.ApartamentID, v.BuildingID, v.StreetID, v.CityID, v.StateID, v.CountryID, v.ZipCodeID,
                                  userId);

            Trace.Assert(result != null);
            IEnumerator <long?> resultList = result.GetEnumerator();

            Trace.Assert(resultList != null);
            resultList.MoveNext();
            long?id = resultList.Current;

            resultList.Dispose(); //  for transaction to be able to complete
            return(id);
        }