Beispiel #1
0
        public IActionResult Delete(int id, [FromServices] IFuncaoRepository repository)
        {
            try
            {
                var funcionario = repository.GetById(id);
                repository.Delete(funcionario);

                return(Ok(""));
            }
            catch (Exception e)
            {
                return(StatusCode(500, e.Message));
            }
        }
 public bool Delete(Guid id)
 {
     return(_repository.Delete(id));
 }