Exemplo n.º 1
0
        public async Task <IActionResult> PutDbo_RelationshipManagers(string id, Dbo_RelationshipManagers dbo_RelationshipManagers)
        {
            if (id != dbo_RelationshipManagers.Username)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <ActionResult <Dbo_RelationshipManagers> > PostDbo_RelationshipManagers(Dbo_RelationshipManagers dbo_RelationshipManagers)
        {
            _context.RelationshipManagers.Add(dbo_RelationshipManagers);
            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (Dbo_RelationshipManagersExists(dbo_RelationshipManagers.Username))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtAction("GetDbo_RelationshipManagers", new { id = dbo_RelationshipManagers.Username }, dbo_RelationshipManagers));
        }