Example #1
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                Cliente obj = await clienteRepositorio.FindAsync(id);

                if (obj == null)
                {
                    return(NotFound());
                }

                obj.Excluido = true;

                await clienteRepositorio.EditAndSaveAsync(obj);

                return(Ok("Excluido!!"));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.ToString()));
            }
        }