Esempio n. 1
0
        public async Task <IActionResult> PutAspNetRoleClaims(int id, datamodels.AspNetRoleClaims aspNetRoleClaims)
        {
            if (id != aspNetRoleClaims.Id)
            {
                return(BadRequest());
            }

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

            return(NoContent());
        }
Esempio n. 2
0
        public async Task <ActionResult <datamodels.AspNetRoleClaims> > PostAspNetRoleClaims(datamodels.AspNetRoleClaims aspNetRoleClaims)
        {
            var mapaux = _mapper.Map <datamodels.AspNetRoleClaims, data.AspNetRoleClaims>(aspNetRoleClaims);

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

            return(CreatedAtAction("GetAspNetRoleClaims", new { id = aspNetRoleClaims.Id }, aspNetRoleClaims));
        }