Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using projetoTeste.Models;
- namespace projetoTeste.Controllers
- {
- [Route("[controller]/[action]")]
- [ApiController]
- public class ColaboradorController : ControllerBase
- {
- private BDContexto contexto;
- public ColaboradorController(BDContexto bdContexto)
- {
- contexto = bdContexto;
- }
- [HttpGet]
- public List<Colaborador> Listar()
- {
- return contexto.Colaborador.ToList();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement