Esempio n. 1
0
        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.");
        }
Esempio n. 2
0
        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.");
        }