Beispiel #1
0
        public async Task <IActionResult> PutAspNetUsers(int id, datamodels.AspNetUsers aspnetusers)
        {
            if (id.Equals(aspnetusers.Id))
            {
                return(BadRequest());
            }

            try
            {
                var mapaux = _mapper.Map <datamodels.AspNetUsers, data.AspNetUsers>(aspnetusers);
                new Solution.BS.AspNetUsers(_context).Update(mapaux);
            }
            catch (Exception ee)
            {
                if (!AspNetUsersExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Beispiel #2
0
        public async Task <ActionResult <datamodels.AspNetUsers> > PostAspNetUsers(datamodels.AspNetUsers aspnetusers)
        {
            var mapaux = _mapper.Map <datamodels.AspNetUsers, data.AspNetUsers>(aspnetusers);

            new Solution.BS.AspNetUsers(_context).Insert(mapaux);

            return(CreatedAtAction("GetAspNetUsers", new { id = aspnetusers.Id }, aspnetusers));
        }