Example #1
0
        public async Task <IActionResult> PutAspNetUserLogins(int id, datamodels.AspNetUserLogins aspnetuserlogins)
        {
            if (!id.Equals(aspnetuserlogins.ProviderKey))
            {
                return(BadRequest());
            }

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

            return(NoContent());
        }
Example #2
0
        public async Task <ActionResult <datamodels.AspNetUserLogins> > PostAspNetUserLogins(datamodels.AspNetUserLogins aspnetuserlogins)
        {
            var mapaux = _mapper.Map <datamodels.AspNetUserLogins, data.AspNetUserLogins>(aspnetuserlogins);

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

            return(CreatedAtAction("GetAspNetUserLogins", new { id = aspnetuserlogins.ProviderKey }, aspnetuserlogins));
        }