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)); }
public void RegisterDelete(AddressesPost addressesPost) { _context.AddressesPost.Remove(addressesPost); }
public void RegisterEdit(AddressesPost addressesPost) { _context.Entry(addressesPost).State = EntityState.Modified; }
public void RegisterCreate(AddressesPost addressesPost) { _context.AddressesPost.Add(addressesPost); }