Exemplo n.º 1
0
        public async Task <IActionResult> Update(int id, BusinessLogic.Alert value)
        {
            if (id != value.ID)
            {
                return(BadRequest());
            }

            await Alerts.UpdateAlert(id, value);

            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <ActionResult <BusinessLogic.Alert> > Create([System.Web.Http.FromBody] BusinessLogic.Alert value)
        {
            await Alerts.InsertAlert(value);

            return(CreatedAtAction(nameof(GetById), new { id = value.ID }, value));
        }