Exemple #1
0
        public async Task <IActionResult> PutAspNetUserClaims(int id, datamodels.AspNetUserClaims aspnetuserclaims)
        {
            if (id != aspnetuserclaims.Id)
            {
                return(BadRequest());
            }

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

            return(NoContent());
        }
Exemple #2
0
        public async Task <ActionResult <datamodels.AspNetUserClaims> > PostAspNetUserClaims(datamodels.AspNetUserClaims aspnetuserclaims)
        {
            var mapaux = _mapper.Map <datamodels.AspNetUserClaims, data.AspNetUserClaims>(aspnetuserclaims);

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

            return(CreatedAtAction("GetAspNetUserClaims", new { id = aspnetuserclaims.Id }, aspnetuserclaims));
        }