Ejemplo n.º 1
0
        public async Task <ActionResult> Delete([FromQuery] Guid id)
        {
            var sellCar = await _ctx.SellCars
                          .FirstOrDefaultAsync(t => t.Id == id);

            _ = _ctx.Remove(sellCar);
            _ = await _ctx.SaveChangesAsync();

            return(Ok(sellCar));
        }
        public async Task <ActionResult> Delete([FromQuery] Guid id)
        {
            var userProfile = await _ctx.UserProfiles
                              .FirstOrDefaultAsync(t => t.Id == id);

            _ = _ctx.Remove(userProfile);
            _ = await _ctx.SaveChangesAsync();

            return(Ok(userProfile));
        }