public Task Delete(AddressesPost addressesPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._addressesRepository.RegisterDelete(addressesPost);
            try
            {
                this._addressesRepository.Commit();
            }
            catch (Exception ex)
            {
                this._addressesRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.CompletedTask);
        }
        public Task <Int64> Create(AddressesPost addressesPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._addressesRepository.RegisterCreate(addressesPost);
            try
            {
                this._addressesRepository.Commit();
            }
            catch (Exception ex)
            {
                this._addressesRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.FromResult(addressesPost.ixAddress));
        }
Exemple #3
0
 public void RegisterDelete(AddressesPost addressesPost)
 {
     _context.AddressesPost.Remove(addressesPost);
 }
Exemple #4
0
 public void RegisterEdit(AddressesPost addressesPost)
 {
     _context.Entry(addressesPost).State = EntityState.Modified;
 }
Exemple #5
0
 public void RegisterCreate(AddressesPost addressesPost)
 {
     _context.AddressesPost.Add(addressesPost);
 }