Exemple #1
0
        public async Task <IActionResult> PutClientaccount2177(int id, Clientaccount2177 clientaccount2177)
        {
            if (id != clientaccount2177.Accountid)
            {
                return(BadRequest());
            }

            _context.Entry(clientaccount2177).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Clientaccount2177Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemple #2
0
        public async Task <ActionResult <Clientaccount2177> > PostClientaccount2177(Clientaccount2177 c)
        {
            // _context.Clientaccount2177.Add(clientaccount2177);


            var accountID = await Task.FromResult(_context.Clientaccount2177.FromSqlRaw("EXEC ADD_CLIENT_ACCOUNT @PACCTNAME = " + c.Acctname +
                                                                                        ", @PBALANCE = " + c.Balance +
                                                                                        ", @PCREDITLIMIT = " + c.Creditlimit).ToList());

            // await _context.SaveChangesAsync();
            return(accountID[0]);
        }