public async Task <string> RegisterBeneficiary(Beneficiary beneficiary) { try{ await _context.Beneficiaries.AddAsync(beneficiary); await _context.SaveChangesAsync(); } catch (Exception e) { return(e.Message); } return("Beneficiary Saved Successfully."); }
public async Task <string> RegisterRemitter(Remitter remitter) { try{ await _context.Remitters.AddAsync(remitter); await _context.IDs.AddAsync(remitter.PrimaryID); await _context.IDs.AddAsync(remitter.SecondaryID); await _context.SaveChangesAsync(); } catch (Exception e) { return(e.Message); } return("Remitter Saved Successfully."); }